🚀 Auto-deploy: Camila atualizado em 07/06/2026 13:59:53
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user