From 85b1c1fe973e8aa7104f6fabbea3a39996a9a5c9 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Mon, 10 Oct 2016 10:14:08 +0100 Subject: [PATCH] Increase default apiMaxLength to 5mb and add to default settings Closes #1001 --- red/api/index.js | 2 +- settings.js | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/red/api/index.js b/red/api/index.js index 3cc777621..4200af192 100644 --- a/red/api/index.js +++ b/red/api/index.js @@ -96,7 +96,7 @@ function init(_server,_runtime) { editorApp.use("/",ui.editorResources); adminApp.use(editorApp); } - var maxApiRequestSize = settings.apiMaxLength || '1mb'; + var maxApiRequestSize = settings.apiMaxLength || '5mb'; adminApp.use(bodyParser.json({limit:maxApiRequestSize})); adminApp.use(bodyParser.urlencoded({limit:maxApiRequestSize,extended:true})); diff --git a/settings.js b/settings.js index c0b121eb9..a4dc8a87c 100644 --- a/settings.js +++ b/settings.js @@ -90,7 +90,11 @@ module.exports = { // that should be served at http://localhost:1880/. //httpStatic: '/home/nol/node-red-static/', - // If you installed the optional node-red-dashboard you can set it's path + // The maximum size of HTTP request that will be accepted by the runtime api. + // Default: 5mb + //apiMaxLength: '5mb', + + // If you installed the optional node-red-dashboard you can set it's path // relative to httpRoot //ui: { path: "ui" },