From e8a74d7ee18fc56fb021a5aaa9d276c5e5d5eaee Mon Sep 17 00:00:00 2001 From: admtracksteel Date: Sun, 26 Jul 2026 21:26:47 +0000 Subject: [PATCH] =?UTF-8?q?Removida=20autentica=C3=A7=C3=A3o=20b=C3=A1sica?= =?UTF-8?q?=20interna=20do=20Node?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server.js | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/server.js b/server.js index 0094712..61f48cb 100644 --- a/server.js +++ b/server.js @@ -11,23 +11,7 @@ const KEYS_HTML_PATH = path.join(__dirname, 'index.html'); app.use(express.json()); -// Autenticação básica simples -const auth = (req, res, next) => { - const authHeader = req.headers.authorization; - if (!authHeader) { - res.setHeader('WWW-Authenticate', 'Basic realm="VaultUI"'); - return res.status(401).send('Autenticação necessária'); - } - const [user, pass] = Buffer.from(authHeader.split(' ')[1], 'base64').toString().split(':'); - if (user === 'tracksteel' && pass === '@@Gi05Br;;') { - next(); - } else { - res.setHeader('WWW-Authenticate', 'Basic realm="VaultUI"'); - return res.status(401).send('Credenciais inválidas'); - } -}; - -app.use(auth); +// Autenticação gerenciada pelo proxy (Traefik/Caddy) // Rota para servir o app app.get('/', (req, res) => {