diff --git a/src/dns-resolvers.ts b/src/dns-resolvers.ts index 5d646c9..16cf345 100644 --- a/src/dns-resolvers.ts +++ b/src/dns-resolvers.ts @@ -28,7 +28,7 @@ export async function dnsRecordsCloudflare(name: string, type: string = 'A'): Pr } const json: any = await re.json() - const records: DnsRecord[] = (json.Answer || []).map((record: any) => { + const records: DnsRecord[] = (json.Answer || json.Authority || []).map((record: any) => { const type = dnsTypeNumbers[record.type] || String(record.type) let data = record.data @@ -50,7 +50,7 @@ export async function dnsRecordsGoogle(name: string, type: string = 'A'): Promis } const json: any = await re.json() - const records: DnsRecord[] = (json.Answer || []).map((record: any) => { + const records: DnsRecord[] = (json.Answer || json.Authority || []).map((record: any) => { const type = dnsTypeNumbers[record.type] || String(record.type) let data = record.data