Skip to content

Commit

Permalink
Merge pull request #297 from zallo-labs/Z-348-max-body-size
Browse files Browse the repository at this point in the history
fix(api): increase max request body size
  • Loading branch information
hbriese authored Aug 27, 2024
2 parents 5d4408a + 3a67100 commit a561472
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<NestExpressApplication>(AppModule, {
logger: [...Object.values(LogLevel).slice(Object.values(LogLevel).indexOf(CONFIG.logLevel))],
});

Expand All @@ -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}`);
Expand Down

0 comments on commit a561472

Please sign in to comment.