mirror of
https://github.com/zedeus/nitter
synced 2026-09-06 07:09:31 +00:00
parent
ecc8bc5a95
commit
e1b3e9db76
8 changed files with 70 additions and 69 deletions
|
|
@ -39,10 +39,7 @@ proc createSearchRouter*(cfg: Config) =
|
|||
redirect("/search?q=" & encodeUrl("#" & @"hash"))
|
||||
|
||||
get "/opensearch":
|
||||
var url = ""
|
||||
if cfg.useHttps:
|
||||
url = "https://" & cfg.hostname & "/search?q="
|
||||
else:
|
||||
url = "http://" & cfg.hostname & "/search?q="
|
||||
var url = if cfg.useHttps: "https://" else: "http://"
|
||||
url &= cfg.hostname & "/search?q="
|
||||
resp Http200, {"Content-Type": "application/opensearchdescription+xml"},
|
||||
generateOpenSearchXML(cfg.title, cfg.hostname, url)
|
||||
|
|
|
|||
Loading…
Reference in a new issue