Filter heads
This commit is contained in:
parent
c1c2d6a6b7
commit
135653ddef
2 changed files with 4 additions and 0 deletions
2
app.js
2
app.js
|
|
@ -31,6 +31,8 @@ async function findMaintainerEmail(host) {
|
||||||
const resolve = await axios(`https://dns.google/resolve?name=${encodeURIComponent(host)}&type=TXT`);
|
const resolve = await axios(`https://dns.google/resolve?name=${encodeURIComponent(host)}&type=TXT`);
|
||||||
if (resolve.data.Answer) {
|
if (resolve.data.Answer) {
|
||||||
for (const head of 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);
|
return head.data.slice(record_email_prefix.length);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
2
index.js
2
index.js
|
|
@ -17,6 +17,8 @@ async function buildCache(host) {
|
||||||
const resolve = await axios(`https://dns.google/resolve?name=${encodeURIComponent(host)}&type=TXT`);
|
const resolve = await axios(`https://dns.google/resolve?name=${encodeURIComponent(host)}&type=TXT`);
|
||||||
if (resolve.data.Answer) {
|
if (resolve.data.Answer) {
|
||||||
for (const head of resolve.data.Answer) {
|
for (const head of resolve.data.Answer) {
|
||||||
|
if (!head.data.startsWith(record_prefix))
|
||||||
|
continue;
|
||||||
let url = head.data.slice(record_prefix.length);
|
let url = head.data.slice(record_prefix.length);
|
||||||
let expand = false;
|
let expand = false;
|
||||||
if (url.indexOf('http://') !== 0 && url.indexOf('https://') !== 0) {
|
if (url.indexOf('http://') !== 0 && url.indexOf('https://') !== 0) {
|
||||||
|
|
|
||||||
Loading…
Add table
editor.link_modal.header
Reference in a new issue