diff options
author | Francis Lavoie <lavofr@gmail.com> | 2020-11-30 12:20:30 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-30 10:20:30 -0700 |
commit | a26f70a12b1289231d705bc002fe1df3180cb6c5 (patch) | |
tree | 7e800807bd1d03f80126900bd528b746e5369195 /caddytest/integration/caddyfile_adapt | |
parent | 4afcdc49d14855c0c3a4fd4558d0f81906db3ffb (diff) |
headers: Fix Caddyfile parsing with request matcher (#3892)
Diffstat (limited to 'caddytest/integration/caddyfile_adapt')
-rw-r--r-- | caddytest/integration/caddyfile_adapt/header.txt | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/caddytest/integration/caddyfile_adapt/header.txt b/caddytest/integration/caddyfile_adapt/header.txt index b8e102f..19a5b41 100644 --- a/caddytest/integration/caddyfile_adapt/header.txt +++ b/caddytest/integration/caddyfile_adapt/header.txt @@ -9,6 +9,10 @@ ?Tim "Berners-Lee" defer } + @images path /images/* + header @images { + Cache-Control "public, max-age=3600, stale-while-revalidate=86400" + } } ---------- { @@ -21,6 +25,27 @@ ], "routes": [ { + "match": [ + { + "path": [ + "/images/*" + ] + } + ], + "handle": [ + { + "handler": "headers", + "response": { + "set": { + "Cache-Control": [ + "public, max-age=3600, stale-while-revalidate=86400" + ] + } + } + } + ] + }, + { "handle": [ { "handler": "headers", |