fix: nginx serves index.html with no-cache headers

Vite hashes all JS/CSS assets, so those can be cached for 30 days.
But index.html must never be cached — it references the current hashes.
Caching index.html meant users ran old JS after deploys.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
2026-05-21 17:54:49 +00:00
co-authored by Claude Sonnet 4.6
parent 3c0fd4f647
commit d789586fca
+4
View File
@@ -19,6 +19,10 @@ RUN echo 'server { \
listen 3000; \ listen 3000; \
root /usr/share/nginx/html; \ root /usr/share/nginx/html; \
index index.html; \ index index.html; \
location = /index.html { \
expires -1; \
add_header Cache-Control "no-store, no-cache, must-revalidate"; \
} \
location / { \ location / { \
try_files $uri $uri/ /index.html; \ try_files $uri $uri/ /index.html; \
expires 30d; \ expires 30d; \