Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 14, 05:15 UTC
fileserver: Clarify docs about canonicalization
Related to https://github.com/caddyserver/caddy/issues/4205.
Matthew Holt committed
Jun 25, 2021 at 11:33 UTC
191dc86f9e40c12517a133cf2181631c9adec791
1 file changed
+4
modules/caddyhttp/fileserver/staticfiles.go
+4
@@ -70,6 +70,10 @@ type FileServer struct {
70
71
// Use redirects to enforce trailing slashes for directories, or to
72
// remove trailing slash from URIs for files. Default is true.
73
+ //
74
+ // Canonicalization will not happen if the last element of the request's
75
+ // path (the filename) is changed in an internal rewrite, to avoid
76
+ // clobbering the explicit rewrite with implicit behavior.
77
CanonicalURIs *bool `json:"canonical_uris,omitempty"`
78
79
// Override the status code written when successfully serving a file.