From 38d0429b836e26ef8d7793603a905818ccab54d8 Mon Sep 17 00:00:00 2001 From: admtracksteel Date: Tue, 24 Mar 2026 10:15:15 +0000 Subject: [PATCH] 24mar26 --- main.py | 8 +++++--- templates/index.html | 23 ++++++----------------- 2 files changed, 11 insertions(+), 20 deletions(-) diff --git a/main.py b/main.py index 133ffba..2a67e55 100644 --- a/main.py +++ b/main.py @@ -34,11 +34,13 @@ async def startup_event(): # --- SEGURANÇA --- async def verify_password(x_web_password: str = Header(None)): - cfg = get_config() - if x_web_password != cfg.get("web_password", "@@Gi05Br;;"): - raise HTTPException(status_code=401, detail="Não autorizado") + # Autenticação desativada conforme solicitado return True +@app.get("/api/login") +async def login_bypass(): + return {"status": "ok", "message": "Autenticação desativada"} + # --- WEB UI --- @app.get("/", response_class=FileResponse) async def read_root(request: Request): diff --git a/templates/index.html b/templates/index.html index 4251062..6560781 100644 --- a/templates/index.html +++ b/templates/index.html @@ -600,10 +600,11 @@ } #login-overlay.hidden { - opacity: 0; - visibility: hidden; + display: none !important; } + #login-overlay { display: none !important; } + .login-card { width: 90%; max-width: 400px; @@ -1575,21 +1576,9 @@ window.toggleRecording = toggleRecording; // Auto-login se já tiver senha salva - if (webPassword) { - (async () => { - try { - const res = await fetch('/api/login', { headers: { 'X-Web-Password': webPassword } }); - if (res.ok) { - document.getElementById('login-overlay').classList.add('hidden'); - initDashboard(); - } else { - showLoginOverlay(); - } - } catch (e) { showLoginOverlay(); } - })(); - } else { - showLoginOverlay(); - } + // Autenticação desativada - Inicia direto + document.getElementById('login-overlay').classList.add('hidden'); + initDashboard();