This commit is contained in:
2025-06-26 23:17:28 +00:00
parent f658a75ccf
commit bc3029d84f
78 changed files with 3533 additions and 2 deletions

View File

@@ -177,7 +177,8 @@ function isOriginAllowed(origin) {
function verifyToken(req, res, next) {
const token = req.headers["token"];
if (!token || token !== process.env.API_TOKEN) {
throw new Error("Token not provided");
res.status(401).json({ message: "Token not provided" });
return;
}
next();