forked from coolaj86/goldilocks.js
		
	fixed crash caused from mistyped url
This commit is contained in:
		
							parent
							
								
									4d49e0fb63
								
							
						
					
					
						commit
						651e53daf1
					
				@ -337,8 +337,12 @@ module.exports = function (myDeps, conf, overrideHttp) {
 | 
			
		||||
    , app: function (config, hostname, pathname, req, res, next) {
 | 
			
		||||
        //var appfile = path.resolve(/*process.cwd(), */config.path.replace(/:hostname/, hostname));
 | 
			
		||||
        var appfile = config.path.replace(/:hostname/, hostname);
 | 
			
		||||
        var app = require(appfile);
 | 
			
		||||
        app(req, res, next);
 | 
			
		||||
        try {
 | 
			
		||||
          var app = require(appfile);
 | 
			
		||||
          app(req, res, next);
 | 
			
		||||
        } catch (err) {
 | 
			
		||||
          next();
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user