This commit is contained in:
Christopher Cookman 2026-01-25 15:12:30 -07:00
parent 1a78f05b98
commit fbc6b79830

View file

@ -41,7 +41,7 @@ global.auth = (req, res, next) => {
if(!process.env.API_KEY) {
return next(); // No API key set, allow all requests
}
if (process.env.API_KEY && req.headers['Authorization'] === process.env.API_KEY) {
if (process.env.API_KEY && req.headers['authorization'] === process.env.API_KEY) {
return next();
}
return res.status(401).json({ error: 'Unauthorized' });