Merge remote-tracking branch 'forgejo/master' into frontend-overhaul
# Conflicts: # app/static/index.html
This commit is contained in:
commit
51e906c41f
5 changed files with 123 additions and 5 deletions
|
|
@ -1003,7 +1003,12 @@ async def list_news_summaries(
|
|||
|
||||
@app.get("/", response_class=HTMLResponse)
|
||||
async def index():
|
||||
return FileResponse(str(STATIC_DIR / "index.html"))
|
||||
# Never let browsers serve a stale copy of the app shell: no Cache-Control
|
||||
# means heuristic caching, and a stale index.html froze older bugs in users'
|
||||
# tabs after deploys. Revalidate every load (ETag still returns 304).
|
||||
resp = FileResponse(str(STATIC_DIR / "index.html"))
|
||||
resp.headers["Cache-Control"] = "no-cache"
|
||||
return resp
|
||||
|
||||
|
||||
# ── NASA GIBS basemap map tab ─────────────────────────────────────────────
|
||||
|
|
|
|||
Loading…
Reference in a new issue