diff options
-rw-r--r-- | build/index.js | 2 | ||||
-rw-r--r-- | src/index.ts | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/build/index.js b/build/index.js index dad9312..4dbe69a 100644 --- a/build/index.js +++ b/build/index.js @@ -19,7 +19,7 @@ const limiter = express_rate_limit_1.default({ }, keyGenerator: (req) => { var _a; - return ((_a = req.headers['Cf-Connecting-Ip']) !== null && _a !== void 0 ? _a : req.ip).toString(); + return ((_a = req.headers['cf-connecting-ip']) !== null && _a !== void 0 ? _a : req.ip).toString(); } }); app.use(limiter); diff --git a/src/index.ts b/src/index.ts index 274df36..6976882 100644 --- a/src/index.ts +++ b/src/index.ts @@ -15,7 +15,7 @@ const limiter = rateLimit({ return req.headers.key === process.env.key }, keyGenerator: (req: express.Request) => { - return (req.headers['Cf-Connecting-Ip'] ?? req.ip).toString() + return (req.headers['cf-connecting-ip'] ?? req.ip).toString() } }) |