diff options
author | Matthew Holt <mholt@users.noreply.github.com> | 2019-11-29 11:23:49 -0700 |
---|---|---|
committer | Matthew Holt <mholt@users.noreply.github.com> | 2019-11-29 11:23:49 -0700 |
commit | 7c7ef8d40e3af35444d522debc95451c04666615 (patch) | |
tree | 30cf3cb2b10e0e19e308eef8031f64bf7739b6bb /caddyconfig | |
parent | 14d3fd7d0307e69c3c8995c42052b9103d1e2299 (diff) |
http: Shorten regexp matcher placeholders; allow "=/" for simple matcher
Diffstat (limited to 'caddyconfig')
-rw-r--r-- | caddyconfig/httpcaddyfile/httptype.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/caddyconfig/httpcaddyfile/httptype.go b/caddyconfig/httpcaddyfile/httptype.go index 05022d1..6ea32a2 100644 --- a/caddyconfig/httpcaddyfile/httptype.go +++ b/caddyconfig/httpcaddyfile/httptype.go @@ -477,7 +477,7 @@ func matcherSetFromMatcherToken( if tkn.Text == "*" { // match all requests == no matchers, so nothing to do return nil, true, nil - } else if strings.HasPrefix(tkn.Text, "/") { + } else if strings.HasPrefix(tkn.Text, "/") || strings.HasPrefix(tkn.Text, "=/") { // convenient way to specify a single path match return map[string]json.RawMessage{ "path": caddyconfig.JSON(caddyhttp.MatchPath{tkn.Text}, warnings), |