chore: update dns over https

This commit is contained in:
Saleel
2024-10-11 01:48:22 +05:30
parent ec8bfd3971
commit 5345da8c64

View File

@@ -115,14 +115,16 @@ export async function resolveDNSHTTP(name: string, type: string) {
throw new CustomError("No DKIM record found in Google", "ENODATA");
}
const cloudflareResult = await DoH.resolveDKIMPublicKey(name, DoHServer.Cloudflare);
if (!cloudflareResult) {
throw new CustomError("No DKIM record found in Cloudflare", "ENODATA");
}
const cloudflareResult = await DoH.resolveDKIMPublicKey(
name,
DoHServer.Cloudflare
);
// Log an error if there is a mismatch in the result
if (googleResult !== cloudflareResult) {
console.error("DKIM record mismatch!");
console.error(
"DKIM record mismatch between Google and Cloudflare! Using Google result."
);
}
return [googleResult];