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
Manipulates HTTP response headers.
Manipulates HTTP response headers. Can add, remove, set, or do substring replacements.
```
headers [<matcher>] [[+|-]<field> [<value>]] {
[+][<field>] [<value>]
[-<field>]
headers [<matcher>] [[+|-]<field> [<value|regexp>] [<replacement>]] {
[+]<field> [<value|regexp> [<replacement>]]
-<field>
}
```
@ -560,7 +560,7 @@ headers [<matcher>] [[+|-]<field> [<value>]] {
Manipulates an HTTP request header.
```
request_header [<matcher>] [[+|-]<field> [<value>]]
request_header [<matcher>] [[+|-]<field> [<value|regexp>] [replacement]]
```
##### 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
matcher indexFiles {
not {
path */
}
not {
path */
}
file {
try_files {path}/index.php
}
@ -629,6 +629,10 @@ reverse_proxy [<matcher>] [<upstreams...>] {
unhealthy_status <status>
unhealthy_latency <duration>
# header manipulation
header_up [+|-]<field> [<value|regexp> [<replacement>]]
header_down [+|-]<field> [<value|regexp> [<replacement>]]
# round trip
transport <name> {
...