forked from baron/baron-sso
SPA 라우팅 보완
This commit is contained in:
@@ -40,11 +40,20 @@ server {
|
||||
}
|
||||
|
||||
# --- UserFront Static Files ---
|
||||
|
||||
# Disable cache for all static files to ensure updates are reflected immediately
|
||||
location ~* \.(js|css|html|json|mjs|wasm)$ {
|
||||
root /usr/share/nginx/html;
|
||||
add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0";
|
||||
try_files $uri =404;
|
||||
}
|
||||
|
||||
# dart2wasm 엔트리포인트는 module 스크립트(.mjs)로 로드되므로
|
||||
# MIME이 정확히 내려가지 않으면 브라우저가 로딩을 차단합니다.
|
||||
location ~* \.mjs$ {
|
||||
root /usr/share/nginx/html;
|
||||
default_type application/javascript;
|
||||
add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0";
|
||||
try_files $uri =404;
|
||||
}
|
||||
|
||||
@@ -52,12 +61,14 @@ server {
|
||||
location ~* \.wasm$ {
|
||||
root /usr/share/nginx/html;
|
||||
default_type application/wasm;
|
||||
add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0";
|
||||
try_files $uri =404;
|
||||
}
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0";
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user