diff options
author | Kévin Dunglas <[email protected]> | 2024-07-03 16:43:13 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2024-07-03 08:43:13 -0600 |
commit | 0287009ee5fbe171e7a84f7d5b965992bb5488a7 (patch) | |
tree | 44df6d0b10e5a6ab4f42b8658000d4b50e212b03 /modules | |
parent | f8861ca16bd475e8519e7dbf5a2b55e81b329874 (diff) | |
download | caddy-0287009ee5fbe171e7a84f7d5b965992bb5488a7.tar.gz caddy-0287009ee5fbe171e7a84f7d5b965992bb5488a7.zip |
intercept: fix http.intercept.header.* placeholder (#6429)
Diffstat (limited to 'modules')
-rw-r--r-- | modules/caddyhttp/intercept/intercept.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/caddyhttp/intercept/intercept.go b/modules/caddyhttp/intercept/intercept.go index 47d7511f7..720a09333 100644 --- a/modules/caddyhttp/intercept/intercept.go +++ b/modules/caddyhttp/intercept/intercept.go @@ -50,7 +50,6 @@ type Intercept struct { // // Three new placeholders are available in this handler chain: // - `{http.intercept.status_code}` The status code from the response - // - `{http.intercept.status_text}` The status text from the response // - `{http.intercept.header.*}` The headers from the response HandleResponse []caddyhttp.ResponseHandler `json:"handle_response,omitempty"` @@ -161,7 +160,7 @@ func (ir Intercept) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddy // set up the replacer so that parts of the original response can be // used for routing decisions - for field, value := range r.Header { + for field, value := range rec.Header() { repl.Set("http.intercept.header."+field, strings.Join(value, ",")) } repl.Set("http.intercept.status_code", rec.Status()) |