diff --git a/backend/ratelimit.ts b/backend/ratelimit.ts index 7e6a31d..77115f1 100644 --- a/backend/ratelimit.ts +++ b/backend/ratelimit.ts @@ -38,7 +38,7 @@ export const setRateLimiter = (group: string, config: EndpointRateLimitConfigura * creates middleware for rate limiting */ export const rateLimiterMiddleware = (group: string, config: EndpointRateLimitConfiguration | undefined): (req: Request, res: Response, next: NextFunction) => void => { - if (rateLimiterGroups.has(group)) setRateLimiter(group, config); + if (!rateLimiterGroups.has(group)) setRateLimiter(group, config); return (req, res, next) => { return rateLimiterGroups.get(group)!(req, res, next);