From 34e874ced3f12077e0dd1cc8ee0bd90b170bcea2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabr=C3=ADcio=20Jos=C3=A9=20Souza?= <1116377+fabriciojs@users.noreply.github.com> Date: Wed, 26 Jan 2022 22:14:51 -0300 Subject: [PATCH] bump request size limit + env setting --- pdf-service.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pdf-service.js b/pdf-service.js index ef0cf3f..b5b4f40 100644 --- a/pdf-service.js +++ b/pdf-service.js @@ -8,12 +8,12 @@ const bodyParser = require('body-parser'); const compression = require('compression'); app.use(compression()); -app.use(bodyParser.json()); // support json encoded bodies app.use(bodyParser.urlencoded({ extended: true, - limit: '100mb', + limit: process.env.REQUEST_SIZE_LIMIT || '250mb', parameterLimit: 1000, })); // support encoded bodies +app.use(bodyParser.json()); // support json encoded bodies const storagePath = path.join(__dirname, 'storage'); if (!fs.existsSync(storagePath)) {