diff options
author | Matthew Holt <mholt@users.noreply.github.com> | 2021-06-25 11:33:18 -0600 |
---|---|---|
committer | Matthew Holt <mholt@users.noreply.github.com> | 2021-06-25 11:33:18 -0600 |
commit | 191dc86f9e40c12517a133cf2181631c9adec791 (patch) | |
tree | 6856e86566a6ce170096788295268e1e03fb53c0 /modules/caddyhttp | |
parent | 81e5318021dea884ab1cc92eb47a2a24585e3c5f (diff) |
fileserver: Clarify docs about canonicalization
Related to https://github.com/caddyserver/caddy/issues/4205.
Diffstat (limited to 'modules/caddyhttp')
-rw-r--r-- | modules/caddyhttp/fileserver/staticfiles.go | 4 |
1 files changed, 4 insertions, 0 deletions
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. |