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 <noreply@anthropic.com>
This commit is contained in:
parent
3c0fd4f647
commit
d789586fca
@ -19,6 +19,10 @@ RUN echo 'server { \
|
||||
listen 3000; \
|
||||
root /usr/share/nginx/html; \
|
||||
index index.html; \
|
||||
location = /index.html { \
|
||||
expires -1; \
|
||||
add_header Cache-Control "no-store, no-cache, must-revalidate"; \
|
||||
} \
|
||||
location / { \
|
||||
try_files $uri $uri/ /index.html; \
|
||||
expires 30d; \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user