diff options
author | Matthew Holt <mholt@users.noreply.github.com> | 2020-01-22 09:32:38 -0700 |
---|---|---|
committer | Matthew Holt <mholt@users.noreply.github.com> | 2020-01-22 09:32:38 -0700 |
commit | d810637a9fe2d2015b1f5ad701fdc23f26dda66a (patch) | |
tree | 10c402a69a10b17a19d50f971caa78f835930852 /modules | |
parent | 5d3ccf1eb79c47c1da37836b60903f26693b8018 (diff) |
httpcaddyfile: Update directive docs; put root after rewrite
Diffstat (limited to 'modules')
-rw-r--r-- | modules/caddyhttp/fileserver/matcher.go | 9 | ||||
-rw-r--r-- | modules/caddyhttp/staticresp.go | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/modules/caddyhttp/fileserver/matcher.go b/modules/caddyhttp/fileserver/matcher.go index c119865..ed5c102 100644 --- a/modules/caddyhttp/fileserver/matcher.go +++ b/modules/caddyhttp/fileserver/matcher.go @@ -51,9 +51,12 @@ type MatchFile struct { Root string `json:"root,omitempty"` // The list of files to try. Each path here is - // considered relatice to Root. If nil, the - // request URL's path will be assumed. Accepts - // placeholders. + // considered relatice to Root. If nil, the request + // URL's path will be assumed. Files and + // directories are treated distinctly, so to match + // a directory, the filepath MUST end in a forward + // slash `/`. To match a regular file, there must + // be no trailing slash. Accepts placeholders. TryFiles []string `json:"try_files,omitempty"` // How to choose a file in TryFiles. Can be: diff --git a/modules/caddyhttp/staticresp.go b/modules/caddyhttp/staticresp.go index 777ecb2..3841a26 100644 --- a/modules/caddyhttp/staticresp.go +++ b/modules/caddyhttp/staticresp.go @@ -54,7 +54,7 @@ func (StaticResponse) CaddyModule() caddy.ModuleInfo { // UnmarshalCaddyfile sets up the handler from Caddyfile tokens. Syntax: // -// respond [<matcher>] [<status>|[<body> [<status>]] { +// respond [<matcher>] <status>|<body> [<status>] { // body <text> // close // } |