aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Cana/Server.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Cana/Server.hs b/src/Cana/Server.hs
index 766a371..130de47 100644
--- a/src/Cana/Server.hs
+++ b/src/Cana/Server.hs
@@ -132,7 +132,11 @@ parseConfig input = case parse input of
"staticfiles" -> do
path <- unwrapMaybe "No path for static files given" .
lookup "path" $ attributes elem
- return . staticFiles $ UTF8.toString path
+ let doIndices = any ((== "indices") . name) $ children elem
+ return . staticFiles' $ def
+ { sfBasePath = UTF8.toString path
+ , sfDoIndices = doIndices
+ }
"runcgi" -> do
script <- unwrapMaybe "No script for CGI handler given" .