Skip to content

Commit

Permalink
fileserver: Clarify docs about canonicalization
Browse files Browse the repository at this point in the history
Related to #4205.
  • Loading branch information
mholt committed Jun 25, 2021
1 parent 81e5318 commit 191dc86
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/caddyhttp/fileserver/staticfiles.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 191dc86

Please sign in to comment.