first commit
Deploy Node App / deploy (push) Failing after 1s

This commit is contained in:
Gitea
2026-05-25 15:56:12 +05:30
parent 9ed3f393e1
commit 5e487b2e3a
+1 -1
View File
@@ -5,7 +5,7 @@ const JWT_SECRET = 'secretkey';
const authHeader = req.headers.authorization;
if (!authHeader || !authHeader.startsWith('Bearer ')) {
return res.status(401).json({ error: 'Unauthorized: Missing or invalid token format' });
}
}
const token = authHeader.split(' ')[1];
try {
const decoded = jwt.verify(token, JWT_SECRET);