From f9066a0ae9deedb7b34478e10e8a775136ab75c5 Mon Sep 17 00:00:00 2001 From: Matt Holt Date: Fri, 20 Sep 2019 13:18:22 -0600 Subject: [PATCH] Add header replacement syntax to caddyfile docs --- v2:-Documentation.md | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/v2:-Documentation.md b/v2:-Documentation.md index 4e58637..88660e7 100644 --- a/v2:-Documentation.md +++ b/v2:-Documentation.md @@ -546,12 +546,12 @@ encode [] { ##### headers -Manipulates HTTP response headers. +Manipulates HTTP response headers. Can add, remove, set, or do substring replacements. ``` -headers [] [[+|-] []] { - [+][] [] - [-] +headers [] [[+|-] [] []] { + [+] [ []] + - } ``` @@ -560,7 +560,7 @@ headers [] [[+|-] []] { Manipulates an HTTP request header. ``` -request_header [] [[+|-] []] +request_header [] [[+|-] [] [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 [] [] { unhealthy_status unhealthy_latency + # header manipulation + header_up [+|-] [ []] + header_down [+|-] [ []] + # round trip transport { ...