Skip to content

Commit 191dc86

Browse files
committed
fileserver: Clarify docs about canonicalization
Related to #4205.
1 parent 81e5318 commit 191dc86

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

modules/caddyhttp/fileserver/staticfiles.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ type FileServer struct {
7070

7171
// Use redirects to enforce trailing slashes for directories, or to
7272
// 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.
7377
CanonicalURIs *bool `json:"canonical_uris,omitempty"`
7478

7579
// Override the status code written when successfully serving a file.

0 commit comments

Comments
 (0)