fis issue with blocked js files
CI / backend (push) Failing after 42s
CI / frontend (push) Canceled after 5s

This commit is contained in:
2026-08-11 05:53:36 +08:00
parent 8b1eddb587
commit e3f3a3ced8
+12 -9
View File
@@ -9,23 +9,26 @@ server {
root /usr/share/nginx/html; root /usr/share/nginx/html;
index index.html; index index.html;
# Vue Router uses history mode — every unmatched path must fall through # Hashed Vite chunks must 404 as application/octet-stream/empty — never
# to index.html or a hard refresh on /alerts returns 404. # fall through to index.html (that yields MIME "text/html" and breaks
location / { # dynamic import() in the browser).
try_files $uri $uri/ /index.html;
}
# Hashed assets are immutable; index.html must never be cached or clients
# keep loading the previous release's asset manifest.
location /assets/ { location /assets/ {
try_files $uri =404;
expires 1y; expires 1y;
add_header Cache-Control "public, immutable"; add_header Cache-Control "public, immutable";
access_log off;
} }
location = /index.html { location = /index.html {
add_header Cache-Control "no-cache, no-store, must-revalidate"; add_header Cache-Control "no-cache, no-store, must-revalidate";
} }
# Vue Router history mode — unmatched paths fall through to the SPA shell.
location / {
try_files $uri $uri/ /index.html;
}
gzip on; gzip on;
gzip_types text/css application/javascript application/json image/svg+xml; gzip_types text/css application/javascript application/json image/svg+xml;
gzip_min_length 1024; gzip_min_length 1024;
} }