From af5858ba00aeef20e3b4c53b5baba641284eca72 Mon Sep 17 00:00:00 2001 From: mat Date: Tue, 13 Dec 2022 21:15:40 -0600 Subject: ok what if i made the header x-key instead --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 298dee3..b249720 100644 --- a/src/index.ts +++ b/src/index.ts @@ -20,7 +20,7 @@ const limiter = rateLimit({ max: 200, skip: (req: express.Request) => { console.log(req.headers) - return req.headers.key === process.env.key + return req.headers['x-key'] === process.env.key }, keyGenerator: (req: express.Request) => { return (req.headers['cf-connecting-ip'] ?? req.ip).toString() -- cgit