about summary refs log tree commit diff stats
path: root/src/config/config.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-12-12 10:38:42 +0100
committerbptato <nincsnevem662@gmail.com>2023-12-12 19:37:14 +0100
commit4eb57c2b88325d3963c6671a6f27bd08fc07cb59 (patch)
tree06bec584dcaf017d94e570e6cffb394b75aca338 /src/config/config.nim
parentf779f672e6aa28efe03733226465c73c1a7490ad (diff)
downloadchawan-4eb57c2b88325d3963c6671a6f27bd08fc07cb59.tar.gz
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)
Diffstat (limited to 'src/config/config.nim')
-rw-r--r--src/config/config.nim1
1 files changed, 1 insertions, 0 deletions
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 =
list.c' href='/danisanti/profani-tty/commit/src/xmpp/roster_list.h?id=90b9b48ab957f72aba9db664104ec04df986877e'>90b9b48a ^
107fdd35 ^


9b55f2de ^
a4cadf78 ^
107fdd35 ^
2260e3bd ^




107fdd35 ^
a2726b6a ^


107fdd35 ^
055a5f71 ^

a2726b6a ^






e816b124 ^
3b0f7e10 ^
107fdd35 ^
a2726b6a ^


6b830277 ^
a2726b6a ^


ed4d2fcf ^
a2726b6a ^
2e0bc27b ^

973a05d1 ^
b210fb36 ^
107fdd35 ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80