diff --git a/src/dns/digitalocean.js b/src/dns/digitalocean.js index 3d1b59421..486ebb524 100644 --- a/src/dns/digitalocean.js +++ b/src/dns/digitalocean.js @@ -10,6 +10,7 @@ exports = module.exports = { var assert = require('assert'), async = require('async'), + constants = require('../constants.js'), debug = require('debug')('box:dns/digitalocean'), dns = require('native-dns'), SubdomainError = require('../subdomains.js').SubdomainError, @@ -201,7 +202,7 @@ function verifyDnsConfig(dnsConfig, domain, ip, callback) { return callback(new SubdomainError(SubdomainError.BAD_FIELD, 'Domain nameservers are not set to Digital Ocean')); } - upsert(credentials, domain, 'my', 'A', [ ip ], function (error, changeId) { + upsert(credentials, domain, constants.ADMIN_LOCATION, 'A', [ ip ], function (error, changeId) { if (error) return callback(error); debug('verifyDnsConfig: A record added with change id %s', changeId); diff --git a/src/dns/manual.js b/src/dns/manual.js index ad4299013..d575b533b 100644 --- a/src/dns/manual.js +++ b/src/dns/manual.js @@ -10,6 +10,7 @@ exports = module.exports = { var assert = require('assert'), async = require('async'), + constants = require('../constants.js'), debug = require('debug')('box:dns/manual'), dns = require('native-dns'), SubdomainError = require('../subdomains.js').SubdomainError, @@ -55,7 +56,7 @@ function verifyDnsConfig(dnsConfig, domain, ip, callback) { assert.strictEqual(typeof ip, 'string'); assert.strictEqual(typeof callback, 'function'); - var adminDomain = 'my.' + domain; + var adminDomain = constants.ADMIN_LOCATION + '.' + domain; dns.resolveNs(domain, function (error, nameservers) { if (error || !nameservers) return callback(new SubdomainError(SubdomainError.BAD_FIELD, 'Unable to get nameservers')); diff --git a/src/dns/route53.js b/src/dns/route53.js index 1ca5aaa59..d7f5c2a19 100644 --- a/src/dns/route53.js +++ b/src/dns/route53.js @@ -13,6 +13,7 @@ exports = module.exports = { var assert = require('assert'), AWS = require('aws-sdk'), + constants = require('../constants.js'), debug = require('debug')('box:dns/route53'), dns = require('native-dns'), SubdomainError = require('../subdomains.js').SubdomainError, @@ -245,7 +246,7 @@ function verifyDnsConfig(dnsConfig, domain, ip, callback) { return callback(new SubdomainError(SubdomainError.BAD_FIELD, 'Domain nameservers are not set to Route53')); } - upsert(credentials, domain, 'my', 'A', [ ip ], function (error, changeId) { + upsert(credentials, domain, constants.ADMIN_LOCATION, 'A', [ ip ], function (error, changeId) { if (error) return callback(error); debug('verifyDnsConfig: A record added with change id %s', changeId);