summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/caddyhttp/fileserver/caddyfile.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/caddyhttp/fileserver/caddyfile.go b/modules/caddyhttp/fileserver/caddyfile.go
index 447f481..886d667 100644
--- a/modules/caddyhttp/fileserver/caddyfile.go
+++ b/modules/caddyhttp/fileserver/caddyfile.go
@@ -41,6 +41,7 @@ func init() {
// browse [<template_file>]
// precompressed <formats...>
// status <status>
+// disable_canonical_uris
// }
//
func parseCaddyfile(h httpcaddyfile.Helper) (caddyhttp.MiddlewareHandler, error) {
@@ -112,6 +113,13 @@ func parseCaddyfile(h httpcaddyfile.Helper) (caddyhttp.MiddlewareHandler, error)
}
fsrv.StatusCode = caddyhttp.WeakString(h.Val())
+ case "disable_canonical_uris":
+ if h.NextArg() {
+ return nil, h.ArgErr()
+ }
+ falseBool := false
+ fsrv.CanonicalURIs = &falseBool
+
default:
return nil, h.Errf("unknown subdirective '%s'", h.Val())
}