From 10051e98963d589464531ff4511a78d9b2639d21 Mon Sep 17 00:00:00 2001 From: sihoo Date: Tue, 29 Sep 2026 06:54:51 +0000 Subject: [PATCH] =?UTF-8?q?=EB=A3=A8=ED=8A=B8=20=EA=B2=BD=EB=A1=9C(/)=20?= =?UTF-8?q?=EC=9A=94=EC=B2=AD=EB=8F=84=20index.html=EC=B2=98=EB=9F=BC=20?= =?UTF-8?q?=EC=BA=90=EC=8B=9C=20=EC=95=88=20=EB=90=98=EA=B2=8C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit firebase.json의 no-cache 규칙이 "/index.html" 경로에만 걸려있었는데, 실제로 브라우저는 "/"를 요청하고 SPA rewrite로 index.html을 받다보니 그 규칙이 안 먹혀서 1시간 동안 캐시됐다. 이 때문에 배포 직후에도 최대 1시간까지 이전 버전(스크롤 바운스 파란색 버그 등)이 그대로 보이는 문제가 있었음. "/" 경로에도 같은 no-cache 규칙을 추가. Co-Authored-By: Claude Sonnet 5 --- firebase.json | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 73 insertions(+), 1 deletion(-) diff --git a/firebase.json b/firebase.json index b4432b7..3020eef 100644 --- a/firebase.json +++ b/firebase.json @@ -1 +1,73 @@ -{"flutter":{"platforms":{"android":{"default":{"projectId":"school-display-ff28f","appId":"1:137322214849:android:2595999513206bdeb16b40","fileOutput":"android/app/google-services.json"}},"dart":{"lib/firebase_options.dart":{"projectId":"school-display-ff28f","configurations":{"android":"1:137322214849:android:2595999513206bdeb16b40","web":"1:137322214849:web:0423e5c788d95761b16b40"}}}}},"hosting":{"public":"build/web","ignore":["firebase.json","**/.*"],"rewrites":[{"source":"**","destination":"/index.html"}],"headers":[{"source":"/index.html","headers":[{"key":"Cache-Control","value":"no-cache, no-store, must-revalidate"}]},{"source":"/flutter_service_worker.js","headers":[{"key":"Cache-Control","value":"no-cache, no-store, must-revalidate"}]},{"source":"/version.json","headers":[{"key":"Cache-Control","value":"no-cache, no-store, must-revalidate"}]}]}} \ No newline at end of file +{ + "flutter": { + "platforms": { + "android": { + "default": { + "projectId": "school-display-ff28f", + "appId": "1:137322214849:android:2595999513206bdeb16b40", + "fileOutput": "android/app/google-services.json" + } + }, + "dart": { + "lib/firebase_options.dart": { + "projectId": "school-display-ff28f", + "configurations": { + "android": "1:137322214849:android:2595999513206bdeb16b40", + "web": "1:137322214849:web:0423e5c788d95761b16b40" + } + } + } + } + }, + "hosting": { + "public": "build/web", + "ignore": [ + "firebase.json", + "**/.*" + ], + "rewrites": [ + { + "source": "**", + "destination": "/index.html" + } + ], + "headers": [ + { + "source": "/index.html", + "headers": [ + { + "key": "Cache-Control", + "value": "no-cache, no-store, must-revalidate" + } + ] + }, + { + "source": "/", + "headers": [ + { + "key": "Cache-Control", + "value": "no-cache, no-store, must-revalidate" + } + ] + }, + { + "source": "/flutter_service_worker.js", + "headers": [ + { + "key": "Cache-Control", + "value": "no-cache, no-store, must-revalidate" + } + ] + }, + { + "source": "/version.json", + "headers": [ + { + "key": "Cache-Control", + "value": "no-cache, no-store, must-revalidate" + } + ] + } + ] + } +}