From d68751e8069bc050ec3f2967a804e1dca69de4bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Rieussec?= Date: Mon, 30 Apr 2018 20:37:30 -0700 Subject: [PATCH 1/2] Match body size limit to AWS --- lib/serve.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/serve.js b/lib/serve.js index 46374e36..ee0af7ed 100644 --- a/lib/serve.js +++ b/lib/serve.js @@ -79,8 +79,8 @@ exports.listen = function(port) { var config = conf.load(); var app = express(); var dir = config.build.functions || config.build.Functions; - app.use(bodyParser.raw()); - app.use(bodyParser.text({type: "*/*"})); + app.use(bodyParser.raw({limit: "10mb"})); + app.use(bodyParser.text({limit: "10mb", type: "*/*"})); app.use(expressLogging(console, { blacklist: ['/favicon.ico'], })); From 4f78d44058d24c06695ce247dcbc77018434ca86 Mon Sep 17 00:00:00 2001 From: shawn wang Date: Thu, 11 Oct 2018 18:20:21 -0400 Subject: [PATCH 2/2] update serve.js to 6mb update serve.js to 6mb --- lib/serve.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/serve.js b/lib/serve.js index ee0af7ed..6628ab0c 100644 --- a/lib/serve.js +++ b/lib/serve.js @@ -79,8 +79,8 @@ exports.listen = function(port) { var config = conf.load(); var app = express(); var dir = config.build.functions || config.build.Functions; - app.use(bodyParser.raw({limit: "10mb"})); - app.use(bodyParser.text({limit: "10mb", type: "*/*"})); + app.use(bodyParser.raw({limit: "6mb"})); + app.use(bodyParser.text({limit: "6mb", type: "*/*"})); app.use(expressLogging(console, { blacklist: ['/favicon.ico'], }));