Simplified the way to read redirection params from TXT records
This commit is contained in:
parent
dfc18f2d91
commit
83c77eadc9
1 changed files with 1 additions and 2 deletions
|
|
@ -62,9 +62,8 @@ export async function findTxtRecord(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.includes(recordParamDestUrl))
|
|
||||||
continue;
|
|
||||||
const txtData = parseTxtRecordData(head.data);
|
const txtData = parseTxtRecordData(head.data);
|
||||||
|
if (!txtData[recordParamDestUrl]) continue;
|
||||||
return {
|
return {
|
||||||
url: txtData[recordParamDestUrl],
|
url: txtData[recordParamDestUrl],
|
||||||
httpStatus: txtData[recordParamHttpStatus],
|
httpStatus: txtData[recordParamHttpStatus],
|
||||||
|
|
|
||||||
Loading…
Add table
editor.link_modal.header
Reference in a new issue