mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-10 07:07:21 +00:00
increase rate limit to 100 per minute for each IP
This commit is contained in:
@ -47,7 +47,7 @@ import { WeatherModule } from './weather/weather.module';
|
|||||||
load: config,
|
load: config,
|
||||||
}),
|
}),
|
||||||
ThrottlerModule.forRoot({
|
ThrottlerModule.forRoot({
|
||||||
throttlers: [{ ttl: 60000, limit: 30 }],
|
throttlers: [{ ttl: 60000, limit: 100 }],
|
||||||
generateKey: (context) => {
|
generateKey: (context) => {
|
||||||
const req = context.switchToHttp().getRequest();
|
const req = context.switchToHttp().getRequest();
|
||||||
return req.headers['x-forwarded-for'] || req.ip;
|
return req.headers['x-forwarded-for'] || req.ip;
|
||||||
|
Reference in New Issue
Block a user