fixed bug in finding relevant http module for domains

This commit is contained in:
tigerbot 2017-08-04 16:42:10 -06:00
parent fee0df3ec9
commit 66e9ecd2bf
1 changed files with 7 additions and 2 deletions

View File

@ -419,12 +419,17 @@ module.exports.create = function (deps, conf, greenlockMiddleware) {
return false;
}
return dom.modules.some(function (mod) {
var subProm = PromiseA.resolve(false);
dom.modules.forEach(function (mod) {
if (moduleChecks[mod.name]) {
subProm = subProm.then(function (handled) {
if (handled) { return handled; }
return moduleChecks[mod.name](mod, conn, opts, headers);
});
}
console.warn('unknown HTTP module under domains', dom.names.join(','), mod);
});
return subProm;
});
});
(conf.http.modules || []).forEach(function (mod) {