From 0754c0ff05c60aaf30aff4ca22a5765a952bc0b5 Mon Sep 17 00:00:00 2001 From: Phillip Thelen Date: Thu, 2 Mar 2023 18:04:02 +0100 Subject: [PATCH] correctly set limit --- website/server/middlewares/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/website/server/middlewares/index.js b/website/server/middlewares/index.js index caee16610f..b4b9b269e9 100644 --- a/website/server/middlewares/index.js +++ b/website/server/middlewares/index.js @@ -72,6 +72,7 @@ export default function attachMiddlewares (app, server) { app.use(bodyParser.urlencoded({ extended: true, // Uses 'qs' library as old connect middleware + limit: '10mb', })); app.use(function bodyMiddleware (req, res, next) { // eslint-disable-line prefer-arrow-callback if (req.path === '/stripe/webhooks') { @@ -79,7 +80,7 @@ export default function attachMiddlewares (app, server) { // See https://stripe.com/docs/webhooks/signatures#verify-official-libraries bodyParser.raw({ type: 'application/json' })(req, res, next); } else { - bodyParser.json()(req, res, next); + bodyParser.json({ limit: '10mb' })(req, res, next); } });