fix: add cache-busting to prevent stale JS/CSS from breaking the UI

- Added ?v=20260502 query param to all <script src=...> and <link> tags
- Added Cache-Control: no-cache, no-store, must-revalidate to index route
- Added <meta> cache-control tags in HTML head for extra coverage
- This ensures the browser always fetches fresh HTML/JS/CSS after deploy,
  preventing the old loadLastPrompt() from running against new HTML
  (which would crash since #prompt-cat-info no longer exists)
This commit is contained in:
2026-05-02 16:08:47 +03:00
parent 393921e524
commit c5e49c73df
2 changed files with 16 additions and 12 deletions

View File

@@ -14,7 +14,8 @@ router = APIRouter()
@router.get("/")
def read_index():
return FileResponse("static/index.html")
headers = {"Cache-Control": "no-cache, no-store, must-revalidate"}
return FileResponse("static/index.html", headers=headers)
@router.get("/logs")