Send Cache-Control: no-store with the dashboard page

The UI is inlined in app.py, so an upgrade changes the HTML behind a URL that
never changes and carried no cache headers. A browser holding the previous
page after an update is indistinguishable from the update having failed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NAddJGE1G6eGaPzmScG5Vh
This commit is contained in:
Claude
2026-07-25 09:42:57 +00:00
parent b1e74666c6
commit e709413157
+5
View File
@@ -3789,6 +3789,11 @@ class Handler(BaseHTTPRequestHandler):
self.send_response(status)
self.send_header("Content-Type", "text/html; charset=utf-8")
self.send_header("Content-Length", str(len(body)))
# The page is inlined into this file, so a dashboard update changes
# the HTML at a URL that never changes. Without this a browser can
# keep serving the previous UI after an upgrade, which looks exactly
# like the upgrade having silently failed.
self.send_header("Cache-Control", "no-store, must-revalidate")
self.end_headers()
self.wfile.write(body)