httpcaddyfile: Add {err.*} placeholder shortcut (#4798)

This commit is contained in:
Francis Lavoie 2022-05-24 12:06:46 -04:00 committed by GitHub
parent 9e760e2e0c
commit 58970cae92
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -107,6 +107,7 @@ func (st ServerType) Setup(inputServerBlocks []caddyfile.ServerBlock,
{regexp.MustCompile(`{re\.([\w-]*)\.([\w-]*)}`), "{http.regexp.$1.$2}"},
{regexp.MustCompile(`{vars\.([\w-]*)}`), "{http.vars.$1}"},
{regexp.MustCompile(`{rp\.([\w-\.]*)}`), "{http.reverse_proxy.$1}"},
{regexp.MustCompile(`{err\.([\w-\.]*)}`), "{http.error.$1}"},
}
for _, sb := range originalServerBlocks {