httpcaddyfile: Update directive docs; put root after rewrite

This commit is contained in:
Matthew Holt
2020-01-22 09:32:38 -07:00
parent 5d3ccf1eb7
commit d810637a9f
4 changed files with 27 additions and 9 deletions

View File

@@ -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:

View File

@@ -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
// }