From 4eb57c2b88325d3963c6671a6f27bd08fc07cb59 Mon Sep 17 00:00:00 2001 From: bptato Date: Tue, 12 Dec 2023 10:38:42 +0100 Subject: local CGI: add mapped URI env vars; move about: to adapters * Add MAPPED_URI_* as environment variables when a request is coming from urimethodmap It costs us compatibility with w3m, but it seems to be a massive improvement over smuggling in the URL as a query string and then writing an ad-hoc parser for every single urimethodmap script. The variables are set for every urimethodmap request, to avoid accidental leaking of global environment variables. * Move about: to adapters (an obvious improvement over the previous solution) --- src/config/config.nim | 1 + 1 file changed, 1 insertion(+) (limited to 'src/config/config.nim') diff --git a/src/config/config.nim b/src/config/config.nim index 42ffafdd..db4af966 100644 --- a/src/config/config.nim +++ b/src/config/config.nim @@ -410,6 +410,7 @@ proc getMimeTypes*(config: Config): MimeTypes = const DefaultURIMethodMap = parseURIMethodMap(""" finger: cgi-bin:cha-finger?%s gemini: cgi-bin:gmifetch?%s +about: cgi-bin:about """) proc getURIMethodMap*(config: Config): URIMethodMap = -- cgit 1.4.1-2-gfad0