summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2021-06-25 11:33:18 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2021-06-25 11:33:18 -0600
commit191dc86f9e40c12517a133cf2181631c9adec791 (patch)
tree6856e86566a6ce170096788295268e1e03fb53c0
parent81e5318021dea884ab1cc92eb47a2a24585e3c5f (diff)
fileserver: Clarify docs about canonicalization
Related to https://github.com/caddyserver/caddy/issues/4205.
-rw-r--r--modules/caddyhttp/fileserver/staticfiles.go4
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.