From 55043f954c1b09bc28cca6c795354c10deac4117 Mon Sep 17 00:00:00 2001 From: jzunigax2 <125698953+jzunigax2@users.noreply.github.com> Date: Fri, 17 Jul 2026 20:20:58 -0600 Subject: [PATCH] feat: enhance body parser configuration in main.ts - Added body parser middleware for JSON and URL-encoded data with a size limit of 30mb. - Set bodyParser option to false for improved control over request handling. --- src/main.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main.ts b/src/main.ts index bb88390..a3c92da 100644 --- a/src/main.ts +++ b/src/main.ts @@ -33,11 +33,16 @@ async function bootstrap() { preflightContinue: false, }, bufferLogs: true, + bodyParser: false, }); app.useLogger(app.get(Logger)); const logger = app.get(Logger); + const BODY_SIZE_LIMIT = '30mb'; + app.useBodyParser('json', { limit: BODY_SIZE_LIMIT }); + app.useBodyParser('urlencoded', { extended: true, limit: BODY_SIZE_LIMIT }); + const enableTrustProxy = config.isProduction; app.set('trust proxy', enableTrustProxy); app.set('query parser', 'extended');