allow approveDomains to be an array or function

This commit is contained in:
AJ ONeal 2016-08-17 09:19:52 -06:00
parent 273f5077b7
commit be02418d82
1 changed files with 4 additions and 0 deletions

View File

@ -169,6 +169,10 @@ LE.create = function (le) {
}
if (!le.httpsOptions.SNICallback) {
if (!le.getCertificatesAsync && !le.getCertificates) {
if (Array.isArray(le.approveDomains)) {
le.approvedDomains = le.approveDomains;
le.approveDomains = null;
}
if (!le.approveDomains) {
le.approvedDomains = le.approvedDomains || [];
le.approveDomains = function (lexOpts, certs, cb) {