mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Clarify comment for route key existence check in raw body capture middleware
This commit is contained in:
parent
bb43d63b54
commit
3fc94e7b99
@ -113,7 +113,7 @@ module.exports = function(RED) {
|
|||||||
*/
|
*/
|
||||||
function setupRawBodyCapture(req, _res, next) {
|
function setupRawBodyCapture(req, _res, next) {
|
||||||
var routeKey = getRouteKey({ method: req.method, url: req._parsedUrl.pathname });
|
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)) {
|
if (rawDataRoutes.has(routeKey)) {
|
||||||
|
|
||||||
// Create a PassThrough stream to capture the request body
|
// Create a PassThrough stream to capture the request body
|
||||||
@ -155,10 +155,8 @@ module.exports = function(RED) {
|
|||||||
Object.defineProperty(req, "_nodeRedReqStream", {
|
Object.defineProperty(req, "_nodeRedReqStream", {
|
||||||
value: cloneStream
|
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();
|
return next();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user