From f1f53c9b855fd817c9dec1b9d9f131941a5ab39e Mon Sep 17 00:00:00 2001 From: Aaro Varis Date: Sun, 29 Sep 2024 18:24:29 +0300 Subject: [PATCH] Refactor API key validation to use case-insensitive header name --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 36420f3..831af5a 100644 --- a/index.js +++ b/index.js @@ -98,7 +98,7 @@ async function main() { app.post('/:instanceId', async (req, res) => { - const apikey = req.headers['X-BatchHttp-Api-Key']; + const apikey = req.headers['x-batchhttp-api-key']; if (apikey !== API_KEY) { res.status(401).send({ error: "Invalid API Key"