aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-12-13 21:20:04 -0600
committermat <github@matdoes.dev>2022-12-13 21:20:04 -0600
commitec0eeae074545d41cbe385c4ec459ecdee263c7b (patch)
treed1ec318f36494c29085b60711f20f7de06dd2a5d
parentaf5858ba00aeef20e3b4c53b5baba641284eca72 (diff)
downloadskyblock-api-ec0eeae074545d41cbe385c4ec459ecdee263c7b.tar.gz
skyblock-api-ec0eeae074545d41cbe385c4ec459ecdee263c7b.tar.bz2
skyblock-api-ec0eeae074545d41cbe385c4ec459ecdee263c7b.zip
Revert "ok what if i made the header x-key instead"
This reverts commit af5858ba00aeef20e3b4c53b5baba641284eca72.
-rw-r--r--src/index.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/index.ts b/src/index.ts
index b249720..298dee3 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['x-key'] === process.env.key
+ return req.headers.key === process.env.key
},
keyGenerator: (req: express.Request) => {
return (req.headers['cf-connecting-ip'] ?? req.ip).toString()