Release: agent page no-store cache header #164
@@ -18,6 +18,17 @@ worker = Worker(cfg)
|
|||||||
app = FastAPI(title="FabledCurator GPU agent")
|
app = FastAPI(title="FabledCurator GPU agent")
|
||||||
|
|
||||||
|
|
||||||
|
@app.middleware("http")
|
||||||
|
async def _no_store(request, call_next):
|
||||||
|
# The control page is a static string and the status/gpu/logs polls are
|
||||||
|
# live data — never let the browser cache either, or a freshly-pulled agent
|
||||||
|
# image still shows the OLD UI until a hard refresh (operator-flagged
|
||||||
|
# 2026-06-30).
|
||||||
|
resp = await call_next(request)
|
||||||
|
resp.headers["Cache-Control"] = "no-store"
|
||||||
|
return resp
|
||||||
|
|
||||||
|
|
||||||
@app.on_event("startup")
|
@app.on_event("startup")
|
||||||
def _maybe_autostart() -> None:
|
def _maybe_autostart() -> None:
|
||||||
# With AUTO_START set, a container restart (host reboot, or `restart:
|
# With AUTO_START set, a container restart (host reboot, or `restart:
|
||||||
|
|||||||
Reference in New Issue
Block a user