From 3a67100387fd1fff7f63e3583d4ece0afb205bc0 Mon Sep 17 00:00:00 2001 From: Hayden Briese Date: Tue, 27 Aug 2024 23:05:59 +1000 Subject: [PATCH] fix(api): increase max request body size --- 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 31997e6c3..e39175a0e 100644 --- a/api/src/main.ts +++ b/api/src/main.ts @@ -5,9 +5,10 @@ import { AppModule } from './app.module'; import { Logger } from '@nestjs/common'; import { CONFIG, LogLevel } from '~/config'; import { GQL_ENDPOINT } from './core/apollo/apollo.module'; +import { NestExpressApplication } from '@nestjs/platform-express'; async function bootstrap() { - const app = await NestFactory.create(AppModule, { + const app = await NestFactory.create(AppModule, { logger: [...Object.values(LogLevel).slice(Object.values(LogLevel).indexOf(CONFIG.logLevel))], }); @@ -17,6 +18,7 @@ async function bootstrap() { credentials: true, maxAge: 7200 /* 2 hours */, }); + app.useBodyParser('json', { limit: '1mb' }); await app.listen(CONFIG.apiPort); Logger.debug(`${await app.getUrl()}${GQL_ENDPOINT}`);