|
|
|
@ -3,8 +3,9 @@ import { MongooseModule } from '@nestjs/mongoose' |
|
|
|
import { GatewayModule } from './gateway/gateway.module' |
|
|
|
import { AuthModule } from './auth/auth.module' |
|
|
|
import { UsersModule } from './users/users.module' |
|
|
|
import { ThrottlerGuard, ThrottlerModule } from '@nestjs/throttler' |
|
|
|
import { ThrottlerModule } from '@nestjs/throttler' |
|
|
|
import { APP_GUARD } from '@nestjs/core/constants' |
|
|
|
import { ThrottlerByIpGuard } from './auth/guards/throttle-by-ip.guard' |
|
|
|
|
|
|
|
@Module({ |
|
|
|
imports: [ |
|
|
|
@ -23,7 +24,7 @@ import { APP_GUARD } from '@nestjs/core/constants' |
|
|
|
providers: [ |
|
|
|
{ |
|
|
|
provide: APP_GUARD, |
|
|
|
useClass: ThrottlerGuard, |
|
|
|
useClass: ThrottlerByIpGuard, |
|
|
|
}, |
|
|
|
], |
|
|
|
}) |
|
|
|
|