Version sin Vite.

This commit is contained in:
2026-02-18 16:50:48 +01:00
commit cb312f680a
21 changed files with 2583 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
module.exports = (req, res, next) => {
const authHeader = req.headers['authorization'];
if (!authHeader) return res.status(403).json({ error: 'No se permite el acceso sin token' });
const token = authHeader.split(' ')[1];
// Aquí la lógica de validación de tu token
if (token) {
next(); // Si el token es válido, dejamos pasar
} else {
res.status(401).json({ error: 'Token inválido o expirado' });
}
};