I'm building a node application and a module of this application checks whether the nameservers of a given domain name point to AWS.
Using the dns module I have the below code:
dns.resolveNs(domain, function (err, hostnames) {
console.log(hostnames);
console.log(hostnames.indexOf('awsdns') > -1);
});
hostnames outputs an array of hostnames and the specific domain I've used has the following hostname structure (x4):
ns-xx.awsdns-xx.xxx
But console.log(hostnames.indexOf('awsdns') > -1); returns false?
hostnames?