From f28922a3aed6b96f69435b7bb431498ef31f4b0b Mon Sep 17 00:00:00 2001 From: Hyungi Ahn Date: Wed, 1 Apr 2026 15:47:32 +0900 Subject: [PATCH] =?UTF-8?q?fix(sw):=20/dashboard,=20/login=20=EA=B2=BD?= =?UTF-8?q?=EB=A1=9C=20SW=20fetch=EC=97=90=EC=84=9C=20=EC=A0=9C=EC=99=B8?= =?UTF-8?q?=20=E2=80=94=20=EB=A6=AC=EB=8B=A4=EC=9D=B4=EB=A0=89=ED=8A=B8=20?= =?UTF-8?q?=EB=A3=A8=ED=94=84=20=EB=B0=A9=EC=A7=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SW가 /dashboard fetch → nginx proxy → gateway → 응답 → SW가 다시 fetch → 무한 루프. 프록시 경로는 SW 캐싱에서 제외. Co-Authored-By: Claude Opus 4.6 (1M context) --- system1-factory/web/sw.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/system1-factory/web/sw.js b/system1-factory/web/sw.js index e66115b..9e1bbf3 100644 --- a/system1-factory/web/sw.js +++ b/system1-factory/web/sw.js @@ -20,10 +20,12 @@ self.addEventListener('activate', function(event) { }); self.addEventListener('fetch', function(event) { - // API, POST, cross-origin 요청은 캐싱하지 않음 + // API, POST, cross-origin, 로그인/대시보드 프록시 경로는 캐싱하지 않음 if (event.request.url.includes('/api/')) return; if (event.request.method !== 'GET') return; if (!event.request.url.startsWith(self.location.origin)) return; + var path = new URL(event.request.url).pathname; + if (path === '/dashboard' || path === '/login' || path === '/auth' || path.startsWith('/auth/')) return; event.respondWith( fetch(event.request)