dont allow root to cname itself

This commit is contained in:
William Harrison authored and GitHub committed 2024-11-14 13:40:24 +11:00
1 parent 12c07b444c
commit 43fae0da64
1 file changed
+12 -4
+12 -4
View File
@@ -204,10 +204,18 @@ t("All files should have valid record values", (t) => {
if (key === "CNAME") {
t.regex(value, hostnameRegex, `${file}: Record value should be a valid hostname for ${key}`);
t.false(
value === file.replace(/\.json$/, "") + ".is-a.dev",
`${file}: Record value should not reference itself for ${key}`
);
if(file === "@.json") {
t.false(
value === "is-a.dev",
`${file}: Record value should not reference itself for ${key}`
);
} else {
t.false(
value === file.replace(/\.json$/, "") + ".is-a.dev",
`${file}: Record value should not reference itself for ${key}`
);
}
}
if (key === "URL") {