Fix fqdn building for alternateDomains

This commit is contained in:
Johannes Zellner
2018-06-29 17:08:18 +02:00
parent 2a52543087
commit 6c17709d2a

View File

@@ -391,7 +391,9 @@ function configureApp(app, auditSource, callback) {
// now setup alternateDomain redirects if any
async.eachSeries(app.alternateDomains, function (domain, callback) {
ensureCertificate({ fqdn: `${domain.subdomain}.${domain.domain}`, domain: domain.domain }, auditSource, function (error, bundle) {
var fqdn = (domain.subdomain ? (domain.subdomain + '.') : '') + domain.domain;
ensureCertificate({ fqdn: fqdn, domain: domain.domain }, auditSource, function (error, bundle) {
if (error) return callback(error);
configureAppRedirect(app, domain, bundle, callback);