From f3acddf5e62a062ffd4bddef080b060d325f44b0 Mon Sep 17 00:00:00 2001 From: Alvaro Vega Date: Mon, 6 May 2024 15:33:00 +0200 Subject: [PATCH] set express limit from iota config --- CHANGES_NEXT_RELEASE | 2 +- lib/bindings/HTTPBindings.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES_NEXT_RELEASE b/CHANGES_NEXT_RELEASE index 8b137891..747ecb5a 100644 --- a/CHANGES_NEXT_RELEASE +++ b/CHANGES_NEXT_RELEASE @@ -1 +1 @@ - +- Fix default express limit to 1Mb instead default 100Kb and allow change it throught a conf env var 'IOTA_EXPRESS_LIMIT' (iota-json#827) diff --git a/lib/bindings/HTTPBindings.js b/lib/bindings/HTTPBindings.js index 115df2a8..dbb99537 100644 --- a/lib/bindings/HTTPBindings.js +++ b/lib/bindings/HTTPBindings.js @@ -488,7 +488,7 @@ function start(callback) { httpBindingServer.router.post( config.getConfig().iota.defaultResource || constants.HTTP_MEASURE_PATH, addDefaultHeader, - bodyParser.text(), + bodyParser.text({ limit: config.getConfig().iota.expressLimit }), checkMandatoryParams(false), parseData, addTimestamp,