fix(server): relax the rate limits (#4092)

This commit is contained in:
LongYinan
2023-09-01 13:51:37 +08:00
committed by GitHub
parent 3f21b0b45d
commit 83e7e9db8d
6 changed files with 17 additions and 20 deletions

View File

@@ -22,6 +22,9 @@ import { getRequestResponseFromContext } from './utils/nestjs';
const options: ThrottlerModuleOptions = {
ttl: config.rateLimiter.ttl,
limit: config.rateLimiter.limit,
skipIf: () => {
return !config.node.prod || config.affine.canary;
},
};
if (config.redis.enabled) {
new Logger(RateLimiterModule.name).log('Use Redis');