Spaces:
Running
Running
Commit ·
a6bb2b8
1
Parent(s): e32b28f
[fix] index no-cache header to prevent stale cached page
Browse filesCo-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- app/main.py +5 -1
app/main.py
CHANGED
|
@@ -250,4 +250,8 @@ if FRONTEND_DIR.exists():
|
|
| 250 |
|
| 251 |
@app.get("/")
|
| 252 |
def index() -> FileResponse:
|
| 253 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 250 |
|
| 251 |
@app.get("/")
|
| 252 |
def index() -> FileResponse:
|
| 253 |
+
# no-cache: 브라우저가 매번 재검증하도록 강제 (구버전 HTML/JS 캐시로 인한 표시 누락 방지)
|
| 254 |
+
return FileResponse(
|
| 255 |
+
str(FRONTEND_DIR / "index.html"),
|
| 256 |
+
headers={"Cache-Control": "no-cache, max-age=0, must-revalidate"},
|
| 257 |
+
)
|