diff --git a/src/docs/markdown/caddyfile/directives/header.md b/src/docs/markdown/caddyfile/directives/header.md index cf96cad..5f3bc08 100644 --- a/src/docs/markdown/caddyfile/directives/header.md +++ b/src/docs/markdown/caddyfile/directives/header.md @@ -13,9 +13,6 @@ By default, header operations are performed immediately unless any of the header ```caddy-d header [] [[+|-|?|>] [|] []] { - # Replace - - # Add + @@ -28,6 +25,12 @@ header [] [[+|-|?|>] [|] []] { # Delete - + # Replace + + + # Replace with defer + > + # Default ? @@ -121,3 +124,9 @@ To override the cache expiration that a proxy upstream had set for paths startin header /no-cache* >Cache-Control nocache reverse_proxy upstream:443 ``` + +To perform a deferred update of a `Set-Cookie` header to add `SameSite=None`; a regexp capture is used to grab the existing value, and `$1` re-inserts it at the start with the additional option appended: + +```caddy-d +header >Set-Cookie (.*) "$1; SameSite=None;" +```