diff --git a/nginx.conf b/nginx.conf index 6fe8a2d..b3434a4 100644 --- a/nginx.conf +++ b/nginx.conf @@ -21,6 +21,15 @@ http { root /usr/share/nginx/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 location / { try_files $uri $uri/ /index.html;