mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	@@ -59,8 +59,8 @@ function init(settings,_server,storage,runtimeAPI) {
 | 
				
			|||||||
        adminApp.use(corsHandler);
 | 
					        adminApp.use(corsHandler);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (settings.httpAdminMiddleware) {
 | 
					        if (settings.httpAdminMiddleware) {
 | 
				
			||||||
            if (typeof settings.httpAdminMiddleware === "function") {
 | 
					            if (typeof settings.httpAdminMiddleware === "function" || Array.isArray(settings.httpAdminMiddleware)) {
 | 
				
			||||||
                adminApp.use(settings.httpAdminMiddleware)
 | 
					                adminApp.use(settings.httpAdminMiddleware);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -210,7 +210,7 @@ module.exports = function(RED) {
 | 
				
			|||||||
            var httpMiddleware = function(req,res,next) { next(); }
 | 
					            var httpMiddleware = function(req,res,next) { next(); }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if (RED.settings.httpNodeMiddleware) {
 | 
					            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;
 | 
					                    httpMiddleware = RED.settings.httpNodeMiddleware;
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user