fix(frontend): no-store on index.html so deploys aren't served stale
index.html points at the hashed asset bundle; without a no-cache header the browser kept serving a previous deploy's index.html (and thus old JS), which showed the BYOK UI instead of the freshly-deployed billing UI. Add Cache-Control: no-store on the SPA fallback (security headers repeated since nginx add_header doesn't inherit into a location that sets its own).
This commit is contained in:
parent
c32d579675
commit
06efc095a5
1 changed files with 7 additions and 0 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue