From 86f3e7a21c5fcfd27a376e8e8b91414c53396675 Mon Sep 17 00:00:00 2001 From: kyy Date: Thu, 19 Feb 2026 13:51:49 +0900 Subject: [PATCH] =?UTF-8?q?SPA=20=EB=9D=BC=EC=9A=B0=ED=8C=85=20=EB=B3=B4?= =?UTF-8?q?=EC=99=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- userfront/nginx.conf | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/userfront/nginx.conf b/userfront/nginx.conf index f0bfe5aa..fbe5ad34 100644 --- a/userfront/nginx.conf +++ b/userfront/nginx.conf @@ -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; } }