diff --git a/packages/node_modules/@node-red/editor-api/lib/index.js b/packages/node_modules/@node-red/editor-api/lib/index.js index 972e8daa6..f66e9094b 100644 --- a/packages/node_modules/@node-red/editor-api/lib/index.js +++ b/packages/node_modules/@node-red/editor-api/lib/index.js @@ -59,8 +59,8 @@ function init(settings,_server,storage,runtimeAPI) { adminApp.use(corsHandler); if (settings.httpAdminMiddleware) { - if (typeof settings.httpAdminMiddleware === "function") { - adminApp.use(settings.httpAdminMiddleware) + if (typeof settings.httpAdminMiddleware === "function" || Array.isArray(settings.httpAdminMiddleware)) { + adminApp.use(settings.httpAdminMiddleware); } } 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 d1e2941b4..26234b737 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 @@ -210,7 +210,7 @@ module.exports = function(RED) { var httpMiddleware = function(req,res,next) { next(); } if (RED.settings.httpNodeMiddleware) { - if (typeof RED.settings.httpNodeMiddleware === "function") { + if (typeof RED.settings.httpNodeMiddleware === "function" || Array.isArray(RED.settings.httpNodeMiddleware)) { httpMiddleware = RED.settings.httpNodeMiddleware; } }