🚀 Auto-deploy: Camila atualizado em 07/06/2026 13:59:53

This commit is contained in:
2026-06-07 13:59:53 +00:00
parent 179d28f8f1
commit c4c8e6ffcf
+10 -2
View File
@@ -3220,9 +3220,17 @@ app.post('/api/logout', (req, res) => {
res.json({ success: true }); res.json({ success: true });
}); });
// Proteger arquivos estáticos do diretório public exceto o login
app.use((req, res, next) => { app.use((req, res, next) => {
if (req.path === '/login' || req.path === '/login.html' || req.path === '/login.js' || req.path === '/style.css' || req.path.startsWith('/assets/')) { if (
req.path === '/login' ||
req.path === '/login.html' ||
req.path === '/login.js' ||
req.path === '/style.css' ||
req.path === '/manifest.json' ||
req.path === '/sw.js' ||
req.path === '/favicon.ico' ||
req.path.startsWith('/assets/')
) {
return next(); return next();
} }
requireAuth(req, res, next); requireAuth(req, res, next);