diff --git a/server.js b/server.js index 341f441..34614e8 100644 --- a/server.js +++ b/server.js @@ -3220,9 +3220,17 @@ app.post('/api/logout', (req, res) => { res.json({ success: true }); }); -// Proteger arquivos estáticos do diretório public exceto o login 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(); } requireAuth(req, res, next);