You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Redis version: Redis server v=7.2.5 sha=00000000:0 malloc=libc bits=64 build=bd81cd1340e80580
I'm trying to use this rate limiter with nestjs, based on this code:
constredisClient=newRedis()constlimiter=newRateLimiterRedis({redis: redisClient,useRedisPackage: true,keyPrefix: 'login_fail_consecutive_username',points: 20,duration: 60*60*24,// Store number for three hours since first fail});// ...asyncconsume=()=>{returnlimiter.consume("userId123",1)}
I debugged and found the error exactly to be on this like node_modules/rate-limiter-flexible/lib/RateLimiterRedis.js:128 :
Redis version:
Redis server v=7.2.5 sha=00000000:0 malloc=libc bits=64 build=bd81cd1340e80580
I'm trying to use this rate limiter with nestjs, based on this code:
I debugged and found the error exactly to be on this like
node_modules/rate-limiter-flexible/lib/RateLimiterRedis.js:128
:where:
this._incrTtlLuaScript=
"redis.call('set', KEYS[1], 0, 'EX', ARGV[2], 'NX') local consumed = redis.call('incrby', KEYS[1], ARGV[1]) local ttl = redis.call('pttl', KEYS[1]) if ttl == -1 then redis.call('expire', KEYS[1], ARGV[2]) ttl = 1000 * ARGV[2] end return {consumed, ttl} "
rlKey=
"userId123"
points=
1
SecDuration=
86400
etc...
The text was updated successfully, but these errors were encountered: