Compare commits

...

2 Commits

Author SHA1 Message Date
Hyungi Ahn
d49aa01bd5 fix: gateway 공장관리 카드 → dashboard-new.html로 변경
구 대시보드(dashboard.html)로 보내고 있었음.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 15:50:00 +09:00
Hyungi Ahn
f28922a3ae fix(sw): /dashboard, /login 경로 SW fetch에서 제외 — 리다이렉트 루프 방지
SW가 /dashboard fetch → nginx proxy → gateway → 응답 →
SW가 다시 fetch → 무한 루프. 프록시 경로는 SW 캐싱에서 제외.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 15:47:32 +09:00
2 changed files with 4 additions and 2 deletions

View File

@@ -489,7 +489,7 @@
// ===== Card Definitions =====
var SYSTEM_CARDS = [
{ id: 'factory', name: '공장관리', desc: '작업장 현황, TBM, 설비관리', icon: '\uD83C\uDFED', subdomain: 'tkfb', path: '/pages/dashboard.html', pageKey: 'dashboard', color: '#1a56db' },
{ id: 'factory', name: '공장관리', desc: '작업장 현황, TBM, 설비관리', icon: '\uD83C\uDFED', subdomain: 'tkfb', path: '/pages/dashboard-new.html', pageKey: 'dashboard', color: '#1a56db' },
{ id: 'report_sys', name: '신고', desc: '사건·사고 신고 접수', icon: '\uD83D\uDEA8', subdomain: 'tkreport', accessKey: 'system2', color: '#dc2626' },
{ id: 'quality', name: '부적합관리', desc: '부적합 이슈 추적·처리', icon: '\uD83D\uDCCA', subdomain: 'tkqc', accessKey: 'system3', color: '#059669' },
{ id: 'purchase', name: '구매관리', desc: '자재 구매, 일용직 관리', icon: '\uD83D\uDED2', subdomain: 'tkpurchase', color: '#d97706' },

View File

@@ -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)