mirror of
https://github.com/tiennm99/is-a-dev.git
synced 2026-10-15 00:17:35 +00:00
remove @ + www json files, update reserved
This commit is contained in:
1 parent
3fd2839c98
commit
964fd4b060
6 files changed
+24
-123
No files matched your search
@@ -147,11 +147,9 @@ function validateRecordValues(t, data, file) {
|
||||
);
|
||||
t.notThrows(() => new URL(value), `${file}: Invalid URL for ${key}`);
|
||||
|
||||
// Check for self-referencing redirects
|
||||
const urlHost = new URL(value).host;
|
||||
const isSelfReferencing =
|
||||
file === "@.json" ? urlHost === "is-a.dev" : urlHost === `${subdomain}.is-a.dev`;
|
||||
|
||||
t.false(isSelfReferencing, `${file}: URL cannot point to itself`);
|
||||
t.false(urlHost === `${subdomain}.is-a.dev`, `${file}: URL cannot point to itself`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -264,8 +262,7 @@ function validateRecordValues(t, data, file) {
|
||||
|
||||
// Check for self-referencing redirects
|
||||
const urlHost = new URL(customRedirectURL).host;
|
||||
const isSelfReferencing = file === "@.json" ? urlHost === "is-a.dev" : urlHost === `${subdomain}.is-a.dev`;
|
||||
t.false(isSelfReferencing, `${urlMessage} cannot point to itself at index ${idx}`);
|
||||
t.false(urlHost === `${subdomain}.is-a.dev`, `${urlMessage} cannot point to itself at index ${idx}`);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user