task: increase rate limit timeout

This commit is contained in:
Mhd Zayd Skaff
2025-06-19 10:11:51 +03:00
parent ce1986a27f
commit 069db9a3ea

View File

@ -2,6 +2,7 @@ import { RequestContextMiddleware } from '@app/common/middleware/request-context
import { SeederService } from '@app/common/seed/services/seeder.service'; import { SeederService } from '@app/common/seed/services/seeder.service';
import { Logger, ValidationPipe } from '@nestjs/common'; import { Logger, ValidationPipe } from '@nestjs/common';
import { NestFactory } from '@nestjs/core'; import { NestFactory } from '@nestjs/core';
import { NestExpressApplication } from '@nestjs/platform-express';
import { json, urlencoded } from 'body-parser'; import { json, urlencoded } from 'body-parser';
import rateLimit from 'express-rate-limit'; import rateLimit from 'express-rate-limit';
import helmet from 'helmet'; 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 { setupSwaggerAuthentication } from '../libs/common/src/util/user-auth.swagger.utils';
import { AppModule } from './app.module'; import { AppModule } from './app.module';
import { HttpExceptionFilter } from './common/filters/http-exception/http-exception.filter'; import { HttpExceptionFilter } from './common/filters/http-exception/http-exception.filter';
import { NestExpressApplication } from '@nestjs/platform-express';
async function bootstrap() { async function bootstrap() {
const app = await NestFactory.create<NestExpressApplication>(AppModule); const app = await NestFactory.create<NestExpressApplication>(AppModule);
@ -26,7 +26,7 @@ async function bootstrap() {
app.use( app.use(
rateLimit({ rateLimit({
windowMs: 30 * 1000, windowMs: 2 * 60 * 1000,
max: 50, max: 50,
standardHeaders: true, standardHeaders: true,
legacyHeaders: false, legacyHeaders: false,