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) {
|
, app: function (config, hostname, pathname, req, res, next) {
|
||||||
//var appfile = path.resolve(/*process.cwd(), */config.path.replace(/:hostname/, hostname));
|
//var appfile = path.resolve(/*process.cwd(), */config.path.replace(/:hostname/, hostname));
|
||||||
var appfile = config.path.replace(/:hostname/, hostname);
|
var appfile = config.path.replace(/:hostname/, hostname);
|
||||||
|
try {
|
||||||
var app = require(appfile);
|
var app = require(appfile);
|
||||||
app(req, res, next);
|
app(req, res, next);
|
||||||
|
} catch (err) {
|
||||||
|
next();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue