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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user