Skip to content

Commit

Permalink
chore: update dns over https
Browse files Browse the repository at this point in the history
  • Loading branch information
saleel committed Oct 10, 2024
1 parent ec8bfd3 commit 5345da8
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 5345da8

Please sign in to comment.