From 27e80660fb591c74ea6bd4a7d19e11ed6401abf2 Mon Sep 17 00:00:00 2001 From: Seongbin Kim Date: Sat, 21 Feb 2026 22:01:50 +0900 Subject: [PATCH] fix: prevent stale service worker script caching --- apps/web/serverless.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/web/serverless.yml b/apps/web/serverless.yml index 54601d3..a8bc3ce 100644 --- a/apps/web/serverless.yml +++ b/apps/web/serverless.yml @@ -22,7 +22,14 @@ custom: params: - index.html: CacheControl: 'no-cache' - - '*.js': + # Service Worker는 항상 최신 버전 체크가 가능해야 하므로 immutable 금지 + - sw.js: + CacheControl: 'no-cache, no-store, must-revalidate' + - registerSW.js: + CacheControl: 'no-cache, no-store, must-revalidate' + - manifest.webmanifest: + CacheControl: 'no-cache, no-store, must-revalidate' + - 'workbox-*.js': CacheControl: 'public, max-age=31536000, immutable' - '*.css': CacheControl: 'public, max-age=31536000, immutable'