From 3fc94e7b99957d662eec35501b1dfc1fdbed3fc7 Mon Sep 17 00:00:00 2001 From: Debadutta Panda Date: Tue, 11 Feb 2025 00:34:32 +0530 Subject: [PATCH] Clarify comment for route key existence check in raw body capture middleware --- .../node_modules/@node-red/nodes/core/network/21-httpin.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/node_modules/@node-red/nodes/core/network/21-httpin.js b/packages/node_modules/@node-red/nodes/core/network/21-httpin.js index 0083ad315..14bc4d465 100644 --- a/packages/node_modules/@node-red/nodes/core/network/21-httpin.js +++ b/packages/node_modules/@node-red/nodes/core/network/21-httpin.js @@ -113,7 +113,7 @@ module.exports = function(RED) { */ function setupRawBodyCapture(req, _res, next) { var routeKey = getRouteKey({ method: req.method, url: req._parsedUrl.pathname }); - // Check if settings for this ID exist + // Check if routeKey exist in rawDataRoutes if (rawDataRoutes.has(routeKey)) { // Create a PassThrough stream to capture the request body @@ -155,10 +155,8 @@ module.exports = function(RED) { Object.defineProperty(req, "_nodeRedReqStream", { value: cloneStream }); - // Proceed to the next middleware if no settings found - return next(); } - // Proceed to the next middleware if no settings found + // Proceed to the next middleware return next(); }