From 2065af3aebc8cef97d6f3adbebbbc4003f6da4c1 Mon Sep 17 00:00:00 2001 From: Bruno Charest Date: Fri, 19 Jun 2026 23:57:58 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20ajouter=20Cache-Control=20no-store=20pou?= =?UTF-8?q?r=20=C3=A9viter=20cache=20navigateur?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Le navigateur gardait l'ancien HTML en cache, affichant 'Déconnecté' de la Phase 1 au lieu du nouveau code Phase 2 avec le micro. --- bot_direct.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bot_direct.py b/bot_direct.py index 468196c..34042b5 100644 --- a/bot_direct.py +++ b/bot_direct.py @@ -171,7 +171,10 @@ async def http_handler(websocket): async def process_request(connection, request): """Serve HTML for HTTP requests, upgrade for WebSocket.""" if request.path == "/" or request.path == "/test.html": - headers = Headers([("Content-Type", "text/html; charset=utf-8")]) + headers = Headers([ + ("Content-Type", "text/html; charset=utf-8"), + ("Cache-Control", "no-store, no-cache, must-revalidate"), + ]) return Response(200, "OK", headers, HTML_PAGE.encode()) if request.path == "/ws": return None # Let WebSocket handler take over