2
1
镜像自地址 https://github.com/therootcompany/greenlock-express.js.git 已同步 2025-09-16 15:18:12 +00:00

bail when no servername is available

这个提交包含在:
AJ ONeal 2019-04-02 22:54:38 -06:00
父节点 ffbcc433b3
当前提交 9ae6a768a7

查看文件

@ -62,10 +62,12 @@ module.exports.create = function (opts) {
greenlock.servername = greenlock.approvedDomains[0];
}
}
if (!greenlock.servername) {
resolve(null);
return;
}
return greenlock.check({ domains: [ greenlock.servername ] }).then(function (certs) {
if (certs) {
return {
@ -127,9 +129,11 @@ module.exports.create = function (opts) {
greenlock.tlsOptions.SNICallback = function (domain, cb) {
sniCallback(domain, function (err, context) {
cb(err, context);
if (!context || server._hasDefaultSecureContext) {
return;
}
if (!context || server._hasDefaultSecureContext) { return; }
if (!domain) { domain = greenlock.servername; }
if (!domain) { return; }
return greenlock.check({ domains: [ domain ] }).then(function (certs) {
// ignore the case that check doesn't have all the right args here
// to get the same certs that it just got (eventually the right ones will come in)