diff --git a/main.py b/main.py index a711008..ab18de0 100644 --- a/main.py +++ b/main.py @@ -940,7 +940,10 @@ async def admin_download_file_endpoint(request: Request): @app.get("/admin", response_class=HTMLResponse) async def admin_page(): # Auth check is done client-side (JS) + all /api/admin/* endpoints require admin - return Path("static/admin.html").read_text(encoding="utf-8") + html = Path("static/admin.html").read_text(encoding="utf-8") + # Без no-cache браузер мог отдавать устаревший HTML, в котором loadUsers() + # перезаписывал dropdown файлов и стирал результат loadFileUsers/loadFiles + return HTMLResponse(html, headers={"Cache-Control": "no-cache, must-revalidate"}) # === Batch V3: Generate + Verify + Auto-Retry === diff --git a/static/admin.html b/static/admin.html index f17045c..7e48689 100644 --- a/static/admin.html +++ b/static/admin.html @@ -48,6 +48,7 @@ a { color: var(--accent); text-decoration: none; } Журнал Файлы ← Вернуться в чат +