From 191dc86f9e40c12517a133cf2181631c9adec791 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Fri, 25 Jun 2021 11:33:18 -0600 Subject: fileserver: Clarify docs about canonicalization Related to https://github.com/caddyserver/caddy/issues/4205. --- modules/caddyhttp/fileserver/staticfiles.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'modules') diff --git a/modules/caddyhttp/fileserver/staticfiles.go b/modules/caddyhttp/fileserver/staticfiles.go index 45f8610..592b317 100644 --- a/modules/caddyhttp/fileserver/staticfiles.go +++ b/modules/caddyhttp/fileserver/staticfiles.go @@ -70,6 +70,10 @@ type FileServer struct { // Use redirects to enforce trailing slashes for directories, or to // remove trailing slash from URIs for files. Default is true. + // + // Canonicalization will not happen if the last element of the request's + // path (the filename) is changed in an internal rewrite, to avoid + // clobbering the explicit rewrite with implicit behavior. CanonicalURIs *bool `json:"canonical_uris,omitempty"` // Override the status code written when successfully serving a file. -- cgit v1.2.3