Port admin-web's chunk-reload guard to ops-web (vite:preloadError + router.onError) so a stale tab landing on a lazy-loaded route triggers a single reload instead of a hard 404. Also force index.html through revalidation on both apps so the reload actually fetches a fresh entry referencing the new chunk hashes; hashed asset URLs keep their long immutable cache. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -22,6 +22,13 @@ server {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
# Never cache the SPA entrypoint — chunk hashes change every deploy and a
|
||||
# stale index.html keeps users stuck on 404'd chunks even after reload.
|
||||
location = /index.html {
|
||||
add_header Cache-Control "no-cache, no-store, must-revalidate" always;
|
||||
expires -1;
|
||||
}
|
||||
|
||||
# Proxy API requests to the backend
|
||||
location /api {
|
||||
proxy_pass http://tenant-api:8080;
|
||||
|
||||
Reference in New Issue
Block a user