feat: raise request payload limit for document uploads
This commit is contained in:
@@ -2,6 +2,7 @@ import { NestFactory } from '@nestjs/core';
|
||||
import { ValidationPipe } from '@nestjs/common';
|
||||
import { NestExpressApplication } from '@nestjs/platform-express';
|
||||
import * as session from 'express-session';
|
||||
import { json, urlencoded } from 'express';
|
||||
import { AppModule } from './app.module';
|
||||
|
||||
async function bootstrap() {
|
||||
@@ -9,6 +10,10 @@ async function bootstrap() {
|
||||
|
||||
app.set('trust proxy', 1);
|
||||
|
||||
const requestSizeLimit = process.env.REQUEST_SIZE_LIMIT || '10mb';
|
||||
app.use(json({ limit: requestSizeLimit }));
|
||||
app.use(urlencoded({ limit: requestSizeLimit, extended: true }));
|
||||
|
||||
app.use(
|
||||
session({
|
||||
secret: process.env.SESSION_SECRET || 'change-me',
|
||||
|
||||
Reference in New Issue
Block a user