Ensure absolute URL
This commit is contained in:
parent
00feecd9ff
commit
c1c2d6a6b7
1 changed files with 3 additions and 0 deletions
3
index.js
3
index.js
|
|
@ -19,6 +19,9 @@ async function buildCache(host) {
|
|||
for (const head of resolve.data.Answer) {
|
||||
let url = head.data.slice(record_prefix.length);
|
||||
let expand = false;
|
||||
if (url.indexOf('http://') !== 0 && url.indexOf('https://') !== 0) {
|
||||
throw new Error(url + ' in TXT record is not an absolute URL');
|
||||
}
|
||||
if (url.endsWith('*')) {
|
||||
url = url.substr(0, -1);
|
||||
expand = true;
|
||||
|
|
|
|||
Loading…
Add table
editor.link_modal.header
Reference in a new issue