From a5779cac5304ffc411882a9e112a8724e27cbdff Mon Sep 17 00:00:00 2001 From: teddit Date: Sat, 27 Mar 2021 21:47:11 +0100 Subject: [PATCH] add bodyParser limits --- app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index c38705a..62090b9 100644 --- a/app.js +++ b/app.js @@ -158,8 +158,8 @@ if(config.trust_proxy) { app.set('trust proxy', config.trust_proxy_address) } -app.use(bodyParser.urlencoded({ extended: true })) -app.use(bodyParser.json()) +app.use(bodyParser.urlencoded({ extended: true, limit: '10mb' })) +app.use(bodyParser.json({ limit: '10mb' })) app.use(express.static(`${__dirname}/static`)) app.set('views', './views')