update nginx.conf

This commit is contained in:
2026-03-13 14:03:56 +08:00
parent 42d8b8e8e1
commit eeadd4c825

View File

@@ -21,6 +21,15 @@ http {
root /usr/share/nginx/html; root /usr/share/nginx/html;
index index.html; index index.html;
# Always revalidate the SPA entrypoint so clients pick up the latest
# hashed JS bundle after redeploys.
location = /index.html {
add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate" always;
add_header Pragma "no-cache" always;
add_header Expires "0" always;
try_files $uri =404;
}
# Serve frontend static files # Serve frontend static files
location / { location / {
try_files $uri $uri/ /index.html; try_files $uri $uri/ /index.html;