caddy/modules/caddyhttp
Francis Lavoie aef8d4decc
reverseproxy: Set the headers in the replacer before handle_response (#4165)
Turns out this was an oversight, we assumed we could use `{http.response.header.*}` but that doesn't work because those are grabbed from the response writer, and we haven't copied any headers into the response writer yet.

So the fix is to set all the response headers into the replacer at a new namespace before running the handlers.

This adds the `{http.reverse_proxy.header.*}` replacer.

See https://caddy.community/t/empty-http-response-header-x-accel-redirect/12447
2021-05-12 14:19:08 -06:00
..
caddyauth go.mod: Migrate to golang.org/x/term (#4073) 2021-03-29 12:39:08 -06:00
encode encode: Drop prefer from Caddyfile (#4156) 2021-05-10 11:12:59 -06:00
fileserver fileserver: Fix file matcher with empty try_files (#4147) 2021-05-04 09:49:13 -06:00
headers headers: Fix Caddyfile parsing for request_header with matchers (#4085) 2021-03-29 10:55:29 -06:00
map map: Accept regex substitution in outputs (#3991) 2021-03-10 14:22:33 -07:00
push headers: Support default header values in Caddyfile with '?' (#3807) 2020-11-20 12:38:16 -07:00
requestbody Revert "requestbody: Allow overwriting remote address" 2021-01-19 18:43:01 -07:00
reverseproxy reverseproxy: Set the headers in the replacer before handle_response (#4165) 2021-05-12 14:19:08 -06:00
rewrite rewrite: Implement regex path replacements 2021-03-01 18:27:59 -07:00
standard encode,staticfiles: Content negotiation, precompressed files (#4045) 2021-03-29 18:47:19 -06:00
templates fileserver: Share template logic for both templates and file_server browse (#4093) 2021-04-30 22:17:23 -04:00
app.go reverseproxy: Add duration/latency placeholders (close #4012) (#4013) 2021-02-22 11:57:21 -07:00
autohttps.go caddyhttp: Implement better logic for inserting the HTTP->HTTPS redirs (#4033) 2021-04-19 19:54:12 -06:00
caddyhttp.go httpcaddyfile: Configure servers via global options (#3836) 2020-11-23 12:46:50 -07:00
celmatcher.go caddyhttp: Add support to resolve DN in CEL expression (#3608) 2020-07-31 15:06:30 -06:00
celmatcher_test.go caddyhttp: Add support to resolve DN in CEL expression (#3608) 2020-07-31 15:06:30 -06:00
errors.go ci: Use golangci's github action for linting (#3794) 2020-11-22 14:50:29 -07:00
marshalers.go ci: Use golangci's github action for linting (#3794) 2020-11-22 14:50:29 -07:00
matchers.go reverseproxy: Add handle_response blocks to reverse_proxy (#3710) (#4021) 2021-05-02 12:39:06 -06:00
matchers_test.go reverseproxy: Add handle_response blocks to reverse_proxy (#3710) (#4021) 2021-05-02 12:39:06 -06:00
metrics.go metrics: Always track method label in uppercase (#3742) 2020-09-22 20:10:34 -06:00
metrics_test.go metrics: Fix panic when headers aren't written (#3737) 2020-09-21 13:42:47 -06:00
replacer.go reverseproxy: Add duration/latency placeholders (close #4012) (#4013) 2021-02-22 11:57:21 -07:00
replacer_test.go caddyfile: Fix caddy fmt nesting not decrementing (#4157) 2021-05-10 12:01:27 -06:00
responsematchers.go reverseproxy: Add handle_response blocks to reverse_proxy (#3710) (#4021) 2021-05-02 12:39:06 -06:00
responsematchers_test.go reverseproxy: Add handle_response blocks to reverse_proxy (#3710) (#4021) 2021-05-02 12:39:06 -06:00
responsewriter.go caddyhttp: Fix trailers when recording responses (fixes #3236) 2020-04-22 11:10:13 -06:00
routes.go caddyhttp: Fix fallback for the error handler chain (#4131) 2021-05-05 15:55:40 -06:00
server.go caddyhttp: Implement better logic for inserting the HTTP->HTTPS redirs (#4033) 2021-04-19 19:54:12 -06:00
staticerror.go httpcaddyfile: Add error directive for the existing handler (#4034) 2021-03-12 13:25:49 -07:00
staticresp.go caddyhttp: Check for invalid subdirectives of static_response 2021-02-02 16:19:58 -07:00
staticresp_test.go Implement config adapters and beginning of Caddyfile adapter 2019-08-09 12:05:47 -06:00
subroute.go reverseproxy: Enable changing only the status code (close #2920) 2020-06-04 12:06:38 -06:00
vars.go caddyfile: Add support for vars and vars_regexp matchers (#3730) 2020-09-25 17:50:26 -06:00