fix(frontend): revalidate index.html on every load

nginx sent index.html without Cache-Control, so browsers cached it heuristically. After a deploy, a browser kept loading the previous hashed bundle until the cache expired, and fixes did not appear. The SPA location now sends Cache-Control: no-cache. Hashed assets stay immutable. scripts/check_frontend_html_cache.sh checks both.
This commit is contained in:
2026-11-23 16:36:10 +00:00
parent 933b5a75c0
commit 527c1759f9
2 changed files with 50 additions and 0 deletions
+2
View File
@@ -147,6 +147,8 @@ server {
# Frontend SPA - serve index.html for all other routes
location / {
# index.html names the hashed bundles; a cached copy keeps serving the previous release.
add_header Cache-Control "no-cache" always;
try_files $uri $uri/ /index.html;
}
}