From 9d300d1984c80d194365d3d71281a0220a06bf30 Mon Sep 17 00:00:00 2001 From: bruno Date: Sun, 12 Jul 2026 20:24:49 -0400 Subject: [PATCH] fix: var _wsInitData globale + anti-cache headers HTML MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - x-data="_wsInitData" référence la variable globale JS (pas window.) - var _wsInitData = IIFE — propriété window automatique pour compatibilité window._wsData - Headers Cache-Control: no-cache, no-store, must-revalidate sur la page HTML - 73 tests OK --- app/routers/dashboard.py | 9 ++++++++- app/templates/local_workspace.html | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/app/routers/dashboard.py b/app/routers/dashboard.py index 706808f..a097925 100644 --- a/app/routers/dashboard.py +++ b/app/routers/dashboard.py @@ -542,7 +542,14 @@ async def local_workspace_page(request: Request, folder: int = None): "breadcrumb": breadcrumb, } template = env.get_template("local_workspace.html") - return template.render(**ctx) + return HTMLResponse( + content=template.render(**ctx), + headers={ + "Cache-Control": "no-cache, no-store, must-revalidate", + "Pragma": "no-cache", + "Expires": "0", + } + ) @router.get("/api/local-workspace/tree") diff --git a/app/templates/local_workspace.html b/app/templates/local_workspace.html index 7af320f..da54128 100644 --- a/app/templates/local_workspace.html +++ b/app/templates/local_workspace.html @@ -336,7 +336,7 @@ .preview-leave-end{transform:translateX(100%);opacity:0;} -