Add header replacement syntax to caddyfile docs

Matt Holt 2019-09-20 13:18:22 -06:00
parent c83074ffec
commit f9066a0ae9

@ -546,12 +546,12 @@ encode [<matcher>] <formats...> {
##### headers ##### headers
Manipulates HTTP response headers. Manipulates HTTP response headers. Can add, remove, set, or do substring replacements.
``` ```
headers [<matcher>] [[+|-]<field> [<value>]] { headers [<matcher>] [[+|-]<field> [<value|regexp>] [<replacement>]] {
[+][<field>] [<value>] [+]<field> [<value|regexp> [<replacement>]]
[-<field>] -<field>
} }
``` ```
@ -560,7 +560,7 @@ headers [<matcher>] [[+|-]<field> [<value>]] {
Manipulates an HTTP request header. Manipulates an HTTP request header.
``` ```
request_header [<matcher>] [[+|-]<field> [<value>]] request_header [<matcher>] [[+|-]<field> [<value|regexp>] [replacement]]
``` ```
##### php_fastcgi ##### php_fastcgi
@ -570,9 +570,9 @@ Proxies requests to one or more FastCGI backends specially configured for PHP ap
``` ```
# canonicalize URI trailing slash when index file present # canonicalize URI trailing slash when index file present
matcher indexFiles { matcher indexFiles {
not { not {
path */ path */
} }
file { file {
try_files {path}/index.php try_files {path}/index.php
} }
@ -629,6 +629,10 @@ reverse_proxy [<matcher>] [<upstreams...>] {
unhealthy_status <status> unhealthy_status <status>
unhealthy_latency <duration> unhealthy_latency <duration>
# header manipulation
header_up [+|-]<field> [<value|regexp> [<replacement>]]
header_down [+|-]<field> [<value|regexp> [<replacement>]]
# round trip # round trip
transport <name> { transport <name> {
... ...