feat: add body size limit config as env var
This commit is contained in:
@ -4,7 +4,10 @@ import { hasBody } from 'type-is';
|
||||
|
||||
// Excalidraw Front end doesn't send a Content Type Header
|
||||
// so we tell raw parser to check if there is a body
|
||||
const rawParserMiddleware = raw({ type: hasBody });
|
||||
const rawParserMiddleware = raw({
|
||||
type: hasBody,
|
||||
limit: process.env.BODY_LIMIT ?? '50mb',
|
||||
});
|
||||
|
||||
@Injectable()
|
||||
export class RawParserMiddleware implements NestMiddleware {
|
||||
|
Reference in New Issue
Block a user