Skip to content

Commit

Permalink
refactor(router): do not count OPTIONS requests towards request limit (
Browse files Browse the repository at this point in the history
  • Loading branch information
kkopanidis authored Nov 21, 2023
1 parent d218268 commit 88496f1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions modules/router/src/security/handlers/rate-limiter/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export class RateLimiter {
get limiter() {
const self = this;
return (req: any, res: any, next: any) => {
if (req.method === 'OPTIONS') return next();
const ip =
req.headers['cf-connecting-ip'] ||
req.headers['x-original-forwarded-for'] ||
Expand Down

0 comments on commit 88496f1

Please sign in to comment.