diff options
author | bptato <nincsnevem662@gmail.com> | 2023-12-10 11:47:11 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-12-10 15:08:53 +0100 |
commit | 2dec7483045c9e5696182db7b4ad842491b6c2b2 (patch) | |
tree | eb4173f62684a6334a75254c88a3b0d840284ea7 /src/config | |
parent | e5a0fd6af4296f76987530a9566eb019307fa8bf (diff) | |
download | chawan-2dec7483045c9e5696182db7b4ad842491b6c2b2.tar.gz |
Enable finger protocol by default
* Add a default urimethodmap that points finger: to cha-finger * Install cha-finger to /usr/local/libexec/cha/cgi-bin by default * cha-finger: use ALL_PROXY if given, die if curl is not installed
Diffstat (limited to 'src/config')
-rw-r--r-- | src/config/config.nim | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/config/config.nim b/src/config/config.nim index 5f8e9c17..1274e731 100644 --- a/src/config/config.nim +++ b/src/config/config.nim @@ -385,9 +385,13 @@ proc getMimeTypes*(config: Config): MimeTypes = return DefaultGuess return mimeTypes +const DefaultURIMethodMap = parseURIMethodMap(""" +finger: cgi-bin:cha-finger?%s +""") + proc getURIMethodMap*(config: Config): URIMethodMap = let configDir = getConfigDir() / "chawan" #TODO store this in config? - var urimethodmap: URIMethodMap + var urimethodmap = DefaultURIMethodMap for p in config.external.urimethodmap: let f = openFileExpand(configDir, p) if f != nil: |