From 9969ccafac24cfe7741d3423df9ec6b121b66242 Mon Sep 17 00:00:00 2001 From: Chris Troutner Date: Thu, 25 Feb 2021 07:19:30 -0800 Subject: [PATCH] Testing proLimits in usrObj --- src/middleware/route-ratelimit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/middleware/route-ratelimit.js b/src/middleware/route-ratelimit.js index ffade0f..205d75d 100644 --- a/src/middleware/route-ratelimit.js +++ b/src/middleware/route-ratelimit.js @@ -144,7 +144,7 @@ class RateLimits { let rateLimit = ANON_LIMITS // Only evaluate the JWT token if the user is not using Basic Authentication. - if (!req.locals.proLimit) { + if (!req.locals.proLimit && !req.body.usrObj.proLimit) { // Code here for the rate limiter is adapted from this example: // https://github.com/animir/node-rate-limiter-flexible/wiki/Overall-example#authorized-and-not-authorized-users try {