request_header: Link to proxy header manipulation

For some header fields, it matters that the header manipulation is aware
of the proxying context, for example with hop-by-hop headers.
This commit is contained in:
Matthew Holt 2022-07-19 12:18:09 -06:00
parent 1acf66dd74
commit bb37b39a0e
No known key found for this signature in database
GPG key ID: 2A349DD577D586A5
2 changed files with 3 additions and 1 deletions

View file

@ -6,6 +6,8 @@ title: request_header (Caddyfile directive)
Manipulates HTTP header fields on the request. It can set, add, and delete header values, or perform replacements using regular expressions.
If you intend to manipulate headers for proxying, use the [`header_up` subdirective](/docs/caddyfile/directives/reverse_proxy#header_up) of `reverse_proxy` instead, as those manipulations are proxy-aware.
## Syntax

View file

@ -85,7 +85,7 @@ reverse_proxy [<matcher>] [<upstreams...>] {
buffer_responses
max_buffer_size <size>
# request manipulation
# request/header manipulation
trusted_proxies [private_ranges] <ranges...>
header_up [+|-]<field> [<value|regexp> [<replacement>]]
header_down [+|-]<field> [<value|regexp> [<replacement>]]