Filter heads

This commit is contained in:
Wildan M 2021-08-22 08:22:42 +07:00
commit 135653ddef
2 changed files with 4 additions and 0 deletions

2
app.js
View file

@ -31,6 +31,8 @@ async function findMaintainerEmail(host) {
const resolve = await axios(`https://dns.google/resolve?name=${encodeURIComponent(host)}&type=TXT`);
if (resolve.data.Answer) {
for (const head of resolve.data.Answer) {
if (!head.data.startsWith(record_email_prefix))
continue;
return head.data.slice(record_email_prefix.length);
}
}