about summary refs log tree commit diff stats
path: root/src/config
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-12-10 11:47:11 +0100
committerbptato <nincsnevem662@gmail.com>2023-12-10 15:08:53 +0100
commit2dec7483045c9e5696182db7b4ad842491b6c2b2 (patch)
treeeb4173f62684a6334a75254c88a3b0d840284ea7 /src/config
parente5a0fd6af4296f76987530a9566eb019307fa8bf (diff)
downloadchawan-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.nim6
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: