heroku-certs
Advanced tools
Comparing version 1.1.9 to 1.1.10
@@ -10,7 +10,11 @@ 'use strict' | ||
let stableCname = '.herokudns.com' | ||
let stableCnames = ['.herokudns.com', '.herokudnsdev.com'] | ||
function matches (match) { | ||
return match && _.find(stableCnames, (stableCname) => match.cname.endsWith(stableCname)) | ||
} | ||
module.exports = function (certDomain, domains) { | ||
let exactMatch = _.find(domains, (domain) => certDomain === domain.hostname) | ||
if (exactMatch && exactMatch.cname.endsWith(stableCname)) { | ||
if (matches(exactMatch)) { | ||
return exactMatch.cname | ||
@@ -29,3 +33,3 @@ } | ||
if (wildcardMatch && wildcardMatch.cname.endsWith(stableCname)) { | ||
if (matches(wildcardMatch)) { | ||
return wildcardMatch.cname | ||
@@ -32,0 +36,0 @@ } |
{ | ||
"name": "heroku-certs", | ||
"version": "1.1.9", | ||
"version": "1.1.10", | ||
"description": "heroku ssl plugin", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -552,3 +552,3 @@ 'use strict' | ||
{'kind': 'custom', 'hostname': 'bar.example.org', 'cname': 'bar.example.org.herokudns.com'}, | ||
{'kind': 'custom', 'hostname': 'biz.example.com', 'cname': 'biz.example.com.herokudns.com'}, | ||
{'kind': 'custom', 'hostname': 'biz.example.com', 'cname': 'biz.example.com.herokudnsdev.com'}, | ||
{'kind': 'custom', 'hostname': 'baz.example.org', 'cname': 'baz.example.org.herokudns.com'} | ||
@@ -580,6 +580,6 @@ ]) | ||
Domain Record Type DNS Target | ||
─────────────── ─────────── ───────────────────────────── | ||
─────────────── ─────────── ──────────────────────────────── | ||
foo.example.org CNAME foo.example.org.herokudns.com | ||
bar.example.org CNAME bar.example.org.herokudns.com | ||
biz.example.com CNAME biz.example.com.herokudns.com | ||
biz.example.com CNAME biz.example.com.herokudnsdev.com | ||
baz.example.org CNAME baz.example.org.herokudns.com | ||
@@ -586,0 +586,0 @@ `) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
124509
2888