diff --git a/index.js b/index.js index c95d8c2..2c39133 100644 --- a/index.js +++ b/index.js @@ -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' });