From b33bed5ffa87d244dc3a2aabc97531219ebe3f0b Mon Sep 17 00:00:00 2001 From: Jozef Volak Date: Wed, 22 Jun 2022 11:29:24 +0200 Subject: [PATCH] Configure maximum payload size via env variable --- README.md | 2 ++ src/index.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 37ec553..da8482c 100644 --- a/README.md +++ b/README.md @@ -198,6 +198,8 @@ Default port for user facing proxy: **8088**, Env: `USER_FACING_PORT` Default port for task proxy: **8089**, Env: `TASK_PROXY_PORT` +Default limit for task proxy: **'50mb'**, Env: `TASK_PROXY_LIMIT` + Default conductor URL to proxy: **http://conductor-server:8080**, Env: `PROXY_TARGET` Default schellar URL to proxy: **http://schellar:3000**, Env: `SCHELLAR_TARGET` diff --git a/src/index.js b/src/index.js index b25f5a1..cac9fd6 100644 --- a/src/index.js +++ b/src/index.js @@ -33,7 +33,7 @@ dotenv.config(); var helmet = require('helmet') const app = ExpressApplication(); -app.use(ExpressApplication.json({limit: '50mb', extended: true, type: "application/json"})); +app.use(ExpressApplication.json({limit: process.env.TASK_PROXY_LIMIT ?? '50mb', extended: true, type: "application/json"})); app.use( helmet({