From 7d2b8093aef987e1a19477c45d0b2431f290ac0b Mon Sep 17 00:00:00 2001 From: isra el Date: Wed, 11 Jun 2025 11:30:31 +0300 Subject: [PATCH] chore(api): raise request body limit from 100kb to 2mb --- api/src/main.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/src/main.ts b/api/src/main.ts index 87f9d30..2ef2cc4 100644 --- a/api/src/main.ts +++ b/api/src/main.ts @@ -5,9 +5,10 @@ import { AppModule } from './app.module' import * as firebase from 'firebase-admin' import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger' import * as express from 'express' +import { NestExpressApplication } from '@nestjs/platform-express' async function bootstrap() { - const app = await NestFactory.create(AppModule) + const app: NestExpressApplication = await NestFactory.create(AppModule) const PORT = process.env.PORT || 3001 app.setGlobalPrefix('api') @@ -55,6 +56,7 @@ async function bootstrap() { '/api/v1/billing/webhook/polar', express.raw({ type: 'application/json' }), ) + app.useBodyParser('json', { limit: '2mb' }); app.enableCors() await app.listen(PORT) }