diff --git a/config.js b/config.js index 52d25a8..fbe6e6b 100644 --- a/config.js +++ b/config.js @@ -5,7 +5,7 @@ const DOMAINS = require('./domains.json'); exports.getZoneForDomain = (hostname) => { for (let domain in DOMAINS) { - if (hostname.endsWith(`.${domain}`)) { + if (hostname.endsWith(domain)) { return new Zone(DOMAINS[domain].projectId, DOMAINS[domain].zoneName); } } @@ -13,7 +13,7 @@ exports.getZoneForDomain = (hostname) => { exports.getRecordEntry = (hostname) => { for (let domain in DOMAINS) { - if (hostname.endsWith(`.${domain}`)) { + if (hostname.endsWith(domain)) { if (DOMAINS[domain].records.hasOwnProperty(hostname)) { return DOMAINS[domain].records[hostname]; }