diff --git a/Caddyfile b/Caddyfile index 51b6994..fd7261c 100644 --- a/Caddyfile +++ b/Caddyfile @@ -14,9 +14,13 @@ } # Runtime config: Caddy renders {{env "API_BASE"}} into env.js. Never cache it. + # `templates` only acts on text/html + text/plain by default, so JS responses + # are skipped unless their MIME type is named explicitly here. handle /env.js { - templates header Cache-Control "no-store" + templates { + mime text/javascript application/javascript + } file_server }