From 38ddfb00e37ae2916c11210d556ccaf848cc507b Mon Sep 17 00:00:00 2001 From: fullsizemalt <106900403+fullsizemalt@users.noreply.github.com> Date: Fri, 9 Jan 2026 01:30:39 -0800 Subject: [PATCH] Add no-cache headers for HTML files Prevents browser caching of index.html to ensure fresh asset references after deployments. Static assets remain cached with immutable flag. --- frontend/nginx.conf | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/frontend/nginx.conf b/frontend/nginx.conf index 3ea3adf..91d62b4 100644 --- a/frontend/nginx.conf +++ b/frontend/nginx.conf @@ -36,9 +36,16 @@ server { add_header Cache-Control "public, max-age=31536000, immutable"; } + # HTML files - no cache to ensure fresh asset references + location ~* \.(html)$ { + try_files $uri =404; + add_header Cache-Control "no-cache, no-store, must-revalidate"; + } + # Frontend SPA routing location / { try_files $uri $uri/ /index.html; + add_header Cache-Control "no-cache, no-store, must-revalidate"; } # Security headers