From 069db9a3ea2e00d4f0f4aeab85506be8494da9f3 Mon Sep 17 00:00:00 2001 From: Mhd Zayd Skaff Date: Thu, 19 Jun 2025 10:11:51 +0300 Subject: [PATCH] task: increase rate limit timeout --- src/main.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.ts b/src/main.ts index 0a01fdd..33ce70a 100644 --- a/src/main.ts +++ b/src/main.ts @@ -2,6 +2,7 @@ import { RequestContextMiddleware } from '@app/common/middleware/request-context import { SeederService } from '@app/common/seed/services/seeder.service'; import { Logger, ValidationPipe } from '@nestjs/common'; import { NestFactory } from '@nestjs/core'; +import { NestExpressApplication } from '@nestjs/platform-express'; import { json, urlencoded } from 'body-parser'; import rateLimit from 'express-rate-limit'; import helmet from 'helmet'; @@ -9,7 +10,6 @@ import { WINSTON_MODULE_NEST_PROVIDER } from 'nest-winston'; import { setupSwaggerAuthentication } from '../libs/common/src/util/user-auth.swagger.utils'; import { AppModule } from './app.module'; import { HttpExceptionFilter } from './common/filters/http-exception/http-exception.filter'; -import { NestExpressApplication } from '@nestjs/platform-express'; async function bootstrap() { const app = await NestFactory.create(AppModule); @@ -26,7 +26,7 @@ async function bootstrap() { app.use( rateLimit({ - windowMs: 30 * 1000, + windowMs: 2 * 60 * 1000, max: 50, standardHeaders: true, legacyHeaders: false,