diff --git a/dashboard/nginx.conf b/dashboard/nginx.conf index ff17587..38483e4 100644 --- a/dashboard/nginx.conf +++ b/dashboard/nginx.conf @@ -12,8 +12,15 @@ server { } # SPA: serve index.html for any route (hash routing / deep links). + # index.html must NOT be cached — it points at the hashed asset bundle, so a + # stale cached copy keeps loading the previous deploy's JS. (nginx add_header + # doesn't inherit into a location that sets its own, so the security headers + # are repeated here.) location / { try_files $uri $uri/ /index.html; + add_header Cache-Control "no-store, must-revalidate" always; + add_header X-Content-Type-Options "nosniff" always; + add_header X-Frame-Options "SAMEORIGIN" always; } # Basic security headers.