mirror of https://github.com/node-red/node-red.git
allow for adding an array of middleware functions
parent
34b27f2e68
commit
79b10ed18a
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue