Fix OpenSearch response crash (#1400)

This commit is contained in:
Ian Brown
2026-06-02 13:31:40 -07:00
committed by GitHub
parent 82099de55b
commit 5a4faa0367
+4 -3
View File
@@ -46,6 +46,7 @@ proc createSearchRouter*(cfg: Config) =
redirect("/search?f=tweets&q=" & encodeUrl("#" & @"hash")) redirect("/search?f=tweets&q=" & encodeUrl("#" & @"hash"))
get "/opensearch": get "/opensearch":
let url = getUrlPrefix(cfg) & "/search?f=tweets&q=" let
resp Http200, {"Content-Type": "application/opensearchdescription+xml"}, url = getUrlPrefix(cfg) & "/search?f=tweets&q="
generateOpenSearchXML(cfg.title, cfg.hostname, url) headers = {"Content-Type": "application/opensearchdescription+xml"}
resp Http200, headers, generateOpenSearchXML(cfg.title, cfg.hostname, url)