diff --git a/agent/fc_agent/app.py b/agent/fc_agent/app.py index 1b4d0e3..55a9b81 100644 --- a/agent/fc_agent/app.py +++ b/agent/fc_agent/app.py @@ -18,6 +18,17 @@ worker = Worker(cfg) 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") def _maybe_autostart() -> None: # With AUTO_START set, a container restart (host reboot, or `restart: