diff options
author | Francis Lavoie <[email protected]> | 2022-08-31 12:18:29 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2022-08-31 10:18:29 -0600 |
commit | 68d8ac9802c5e7bf5bf55d1a3c1db634edc93999 (patch) | |
tree | cd8bf600b34f7201db776c11bae8170a08d4b9b0 /caddyconfig | |
parent | 2d5a30b908d022d76c246a09154d1fc611695a17 (diff) | |
download | caddy-68d8ac9802c5e7bf5bf55d1a3c1db634edc93999.tar.gz caddy-68d8ac9802c5e7bf5bf55d1a3c1db634edc93999.zip |
httpcaddyfile: Add `{cookie.*}` placeholder shortcut (#5001)
Diffstat (limited to 'caddyconfig')
-rw-r--r-- | caddyconfig/httpcaddyfile/httptype.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/caddyconfig/httpcaddyfile/httptype.go b/caddyconfig/httpcaddyfile/httptype.go index cca864d06..8fef131bf 100644 --- a/caddyconfig/httpcaddyfile/httptype.go +++ b/caddyconfig/httpcaddyfile/httptype.go @@ -91,10 +91,11 @@ func (st ServerType) Setup(inputServerBlocks []caddyfile.ServerBlock, search *regexp.Regexp replace string }{ - {regexp.MustCompile(`{query\.([\w-]*)}`), "{http.request.uri.query.$1}"}, - {regexp.MustCompile(`{labels\.([\w-]*)}`), "{http.request.host.labels.$1}"}, {regexp.MustCompile(`{header\.([\w-]*)}`), "{http.request.header.$1}"}, + {regexp.MustCompile(`{cookie\.([\w-]*)}`), "{http.request.cookie.$1}"}, + {regexp.MustCompile(`{labels\.([\w-]*)}`), "{http.request.host.labels.$1}"}, {regexp.MustCompile(`{path\.([\w-]*)}`), "{http.request.uri.path.$1}"}, + {regexp.MustCompile(`{query\.([\w-]*)}`), "{http.request.uri.query.$1}"}, {regexp.MustCompile(`{re\.([\w-]*)\.([\w-]*)}`), "{http.regexp.$1.$2}"}, {regexp.MustCompile(`{vars\.([\w-]*)}`), "{http.vars.$1}"}, {regexp.MustCompile(`{rp\.([\w-\.]*)}`), "{http.reverse_proxy.$1}"}, |