increase rate limit to 100 per minute for each IP

This commit is contained in:
Mhd Zayd Skaff
2025-06-25 13:47:42 +03:00
parent f337e6c681
commit 692d5c2ce3

View File

@ -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;