dns: fqdn only needs domain string
This is from the caas days, when we had hyphenated subdomains flag
This commit is contained in:
+6
-6
@@ -59,22 +59,22 @@ function api(provider) {
|
||||
}
|
||||
}
|
||||
|
||||
function fqdn(subdomain, domainObject) {
|
||||
function fqdn(subdomain, domain) {
|
||||
assert.strictEqual(typeof subdomain, 'string');
|
||||
assert.strictEqual(typeof domainObject, 'object');
|
||||
assert.strictEqual(typeof domain, 'string');
|
||||
|
||||
return subdomain + (subdomain ? '.' : '') + domainObject.domain;
|
||||
return subdomain + (subdomain ? '.' : '') + domain;
|
||||
}
|
||||
|
||||
// Hostname validation comes from RFC 1123 (section 2.1)
|
||||
// Domain name validation comes from RFC 2181 (Name syntax)
|
||||
// https://en.wikipedia.org/wiki/Hostname#Restrictions_on_valid_host_names
|
||||
// We are validating the validity of the location-fqdn as host name (and not dns name)
|
||||
function validateHostname(subdomain, domainObject) {
|
||||
function validateHostname(subdomain, domain) {
|
||||
assert.strictEqual(typeof subdomain, 'string');
|
||||
assert.strictEqual(typeof domainObject, 'object');
|
||||
assert.strictEqual(typeof domain, 'string');
|
||||
|
||||
const hostname = fqdn(subdomain, domainObject);
|
||||
const hostname = fqdn(subdomain, domain);
|
||||
|
||||
const RESERVED_SUBDOMAINS = [
|
||||
constants.SMTP_SUBDOMAIN,
|
||||
|
||||
Reference in New Issue
Block a user