mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-11-26 08:54:54 +00:00
increase rate limit to 100 per minute for each IP (#435)
This commit is contained in:
@ -50,7 +50,7 @@ import { SchedulerModule } from './scheduler/scheduler.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();
|
||||||
console.log('Real IP:', req.headers['x-forwarded-for']);
|
console.log('Real IP:', req.headers['x-forwarded-for']);
|
||||||
|
|||||||
Reference in New Issue
Block a user