mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	@@ -154,6 +154,13 @@ module.exports = function(RED) {
 | 
			
		||||
        return wrapper;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    var corsHandler = function(req,res,next) { next(); }
 | 
			
		||||
 | 
			
		||||
    if (RED.settings.httpNodeCors) {
 | 
			
		||||
        corsHandler = cors(RED.settings.httpNodeCors);
 | 
			
		||||
        RED.httpNode.options("*",corsHandler);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    function HTTPIn(n) {
 | 
			
		||||
        RED.nodes.createNode(this,n);
 | 
			
		||||
        if (RED.settings.httpNodeRoot !== false) {
 | 
			
		||||
@@ -185,14 +192,6 @@ module.exports = function(RED) {
 | 
			
		||||
                }
 | 
			
		||||
            };
 | 
			
		||||
 | 
			
		||||
            var corsHandler = function(req,res,next) { next(); }
 | 
			
		||||
 | 
			
		||||
            if (RED.settings.httpNodeCors && !corsSetup) {
 | 
			
		||||
                corsHandler = cors(RED.settings.httpNodeCors);
 | 
			
		||||
                RED.httpNode.options("*",corsHandler);
 | 
			
		||||
                corsSetup = true;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            var httpMiddleware = function(req,res,next) { next(); }
 | 
			
		||||
 | 
			
		||||
            if (RED.settings.httpNodeMiddleware) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user