From 7f7b352bc5cf4354b29377a1aa466aaa5a017402 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C5=82a=C5=BCej=20Owczarczyk?= Date: Sun, 29 Sep 2024 20:44:45 +0200 Subject: [PATCH] Add the limit setting to body parser middlewares in the collector. --- collector/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/collector/index.js b/collector/index.js index 2893754af6f..7c41002dabe 100644 --- a/collector/index.js +++ b/collector/index.js @@ -16,12 +16,14 @@ const extensions = require("./extensions"); const { processRawText } = require("./processRawText"); const { verifyPayloadIntegrity } = require("./middleware/verifyIntegrity"); const app = express(); +const FILE_LIMIT = "3GB"; app.use(cors({ origin: true })); app.use( - bodyParser.text(), - bodyParser.json(), + bodyParser.text({ limit: FILE_LIMIT }), + bodyParser.json({ limit: FILE_LIMIT }), bodyParser.urlencoded({ + limit: FILE_LIMIT, extended: true, }) );