From 06397b761c234b44b426d124213f37c76aee2844 Mon Sep 17 00:00:00 2001 From: Cian Hughes Date: Fri, 24 Jan 2025 18:00:09 +0000 Subject: [PATCH] Corrected caddy caching for caddy v2 --- caddy/Caddyfile | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/caddy/Caddyfile b/caddy/Caddyfile index 8355da2..7548228 100644 --- a/caddy/Caddyfile +++ b/caddy/Caddyfile @@ -4,16 +4,15 @@ } (site) { + @cachedFiles { + path *.webp *.webm *.ico *.js *.css + } + header @cachedFiles Cache-Control "public, max-age=1814400, must-revalidate" + @landing { path / /contact* /about* - cache { - ttl 86400s - } } handle /_app/* { - cache { - ttl 86400s - } reverse_proxy site:3000 } handle @landing { @@ -25,9 +24,6 @@ } } handle /repo* { - cache { - ttl 86400s - } uri strip_prefix /repo reverse_proxy repo-placeholder:80 }