From 4b8459b005ae191fa3004a46bd5d83944118fbbc Mon Sep 17 00:00:00 2001 From: mat ess Date: Sat, 13 Aug 2022 21:29:18 -0400 Subject: [PATCH] Add per route caching headers --- static/Caddyfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/static/Caddyfile b/static/Caddyfile index 15281d8..c485f50 100644 --- a/static/Caddyfile +++ b/static/Caddyfile @@ -45,5 +45,13 @@ http://static-mat-services.fly.dev/ { upgrade-insecure-requests; sandbox allow-same-origin allow-popups" } + + # caching + route { + header /style/* Cache-Control max-age=31536000, immutable + header /image/* Cache-Control max-age=31536000, immutable + header /font/* Cache-Control max-age=31536000, immutable + header Cache-Control max-age=180 + } }