feat(twitter): rate limiter

This commit is contained in:
DIYgod
2024-08-23 13:49:08 +08:00
parent 3241267ea1
commit 39e75731cb
+2 -2
View File
@@ -19,13 +19,13 @@ let authTokenIndex = 0;
const loginLimiter = cache.clients.redisClient
? new RateLimiterRedis({
points: 1,
duration: 5,
duration: 1,
execEvenly: true,
storeClient: cache.clients.redisClient,
})
: new RateLimiterMemory({
points: 1,
duration: 5,
duration: 1,
execEvenly: true,
});