Handle Sender ID records and AzureWebsites ALIAS TXT records

parent 384c4cba
function txtParser(record: string): string {
if(record.includes("v=spf1")) {
/**
* SPF & Sender ID records
*
* See https://telcodb.net/dns/amazon.com for example.
*/
if(record.includes("v=spf1") || record.includes("spf2.0/pra")) {
record = record.replace(/(include|ip4|ip6|a)\:([^\s]+)/g, '$1:<a href="/search?q=$2">$2</a>');
record = record.replace(/(redirect)\=([^\s]+)/g, '$1=<a href="/search?q=$2">$2</a>');
......@@ -7,7 +12,17 @@ function txtParser(record: string): string {
return record;
}
// Default
/**
* AzureWebsites, behind Cloudflare
*
* Example: https://telcodb.net/dns/haveibeenpwned.com
*/
if(record.includes("ALIAS for ") && record.includes("azure")) {
record = record.replace(/ALIAS for ([^\s]+)/, 'ALIAS for <a href="/dns/$1">$1</a>');
return record;
}
return record;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment