Throttling configuration from the backoffice added

This commit is contained in:
Stephanos A
2026-06-26 12:17:01 +03:00
parent 84a14b7312
commit eefbe6e8ed
8 changed files with 152 additions and 21 deletions

View File

@@ -4,7 +4,8 @@ import {
NestModule,
OnApplicationBootstrap,
} from '@nestjs/common';
import { ThrottlerModule, ThrottlerGuard } from '@nestjs/throttler';
import { ThrottlerModule } from '@nestjs/throttler';
import { DynamicThrottlerGuard } from './common/dynamic-throttler.guard';
import { APP_GUARD } from '@nestjs/core';
import { ConfigModule, ConfigService } from '@nestjs/config';
import { ScheduleModule } from '@nestjs/schedule';
@@ -135,7 +136,8 @@ import { TasksModule } from './modules/tasks/tasks.module';
TasksModule,
],
providers: [
{ provide: APP_GUARD, useClass: ThrottlerGuard },
{ provide: APP_GUARD, useClass: DynamicThrottlerGuard },
DynamicThrottlerGuard,
EdrPassengerOrgSeeder,
PassengerStaffUsersSeeder,
],