Handle hyphenatedSubdomains in the backend verifyDnsConfig()
This commit is contained in:
@@ -55,11 +55,16 @@ function verifyDnsConfig(dnsConfig, domain, zoneName, ip, callback) {
|
||||
assert.strictEqual(typeof ip, 'string');
|
||||
assert.strictEqual(typeof callback, 'function');
|
||||
|
||||
var config = {
|
||||
wildcard: !!dnsConfig.wildcard,
|
||||
hyphenatedSubdomains: !!dnsConfig.hyphenatedSubdomains
|
||||
}
|
||||
|
||||
// Very basic check if the nameservers can be fetched
|
||||
dns.resolve(zoneName, 'NS', { timeout: 5000 }, function (error, nameservers) {
|
||||
if (error && error.code === 'ENOTFOUND') return callback(new DomainsError(DomainsError.BAD_FIELD, 'Unable to resolve nameservers for this domain'));
|
||||
if (error || !nameservers) return callback(new DomainsError(DomainsError.BAD_FIELD, error ? error.message : 'Unable to get nameservers'));
|
||||
|
||||
callback(null, { wildcard: !!dnsConfig.wildcard });
|
||||
callback(null, config);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user