first
This commit is contained in:
@@ -23,6 +23,8 @@ import { ThrottlerModule, ThrottlerModuleOptions } from '@nestjs/throttler';
|
||||
import { RateLimiterMiddleware } from './common/middlewares/rate-limiter.middleware';
|
||||
import { RequestSanitizerMiddleware } from './common/middlewares/request-sanitizer.middleware';
|
||||
import { HealthModule } from './health/health.module';
|
||||
import { clientes } from './data-consult/clientes.module';
|
||||
import { PartnersModule } from './partners/partners.module';
|
||||
|
||||
|
||||
@Module({
|
||||
@@ -30,7 +32,7 @@ import { HealthModule } from './health/health.module';
|
||||
UsersModule,
|
||||
ConfigModule.forRoot({ isGlobal: true,
|
||||
load: [jwtConfig]
|
||||
}),
|
||||
}),
|
||||
TypeOrmModule.forRootAsync({
|
||||
name: 'oracle',
|
||||
inject: [ConfigService],
|
||||
@@ -57,6 +59,7 @@ import { HealthModule } from './health/health.module';
|
||||
OrdersPaymentModule,
|
||||
HttpModule,
|
||||
OrdersModule,
|
||||
clientes,
|
||||
ProductsModule,
|
||||
NegotiationsModule,
|
||||
OccurrencesModule,
|
||||
@@ -66,16 +69,17 @@ import { HealthModule } from './health/health.module';
|
||||
AuthModule,
|
||||
OrdersModule,
|
||||
HealthModule,
|
||||
PartnersModule,
|
||||
],
|
||||
controllers: [OcorrencesController, LogisticController ],
|
||||
providers: [ LogisticService, ],
|
||||
providers: [ LogisticService,],
|
||||
})
|
||||
export class AppModule implements NestModule {
|
||||
configure(consumer: MiddlewareConsumer) {
|
||||
consumer
|
||||
.apply(RequestSanitizerMiddleware)
|
||||
.forRoutes('*');
|
||||
|
||||
|
||||
consumer
|
||||
.apply(RateLimiterMiddleware)
|
||||
.forRoutes('auth', 'users');
|
||||
|
||||
Reference in New Issue
Block a user