fis issue with blocked js files
This commit is contained in:
@@ -9,22 +9,25 @@ server {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
# Vue Router uses history mode — every unmatched path must fall through
|
||||
# to index.html or a hard refresh on /alerts returns 404.
|
||||
location / {
|
||||
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.
|
||||
# Hashed Vite chunks must 404 as application/octet-stream/empty — never
|
||||
# fall through to index.html (that yields MIME "text/html" and breaks
|
||||
# dynamic import() in the browser).
|
||||
location /assets/ {
|
||||
try_files $uri =404;
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, immutable";
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /index.html {
|
||||
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_types text/css application/javascript application/json image/svg+xml;
|
||||
gzip_min_length 1024;
|
||||
|
||||
Reference in New Issue
Block a user