mirror of
https://github.com/tiennm99/is-a-dev.git
synced 2026-10-13 08:15:41 +00:00
dont allow root to cname itself
This commit is contained in:
1 parent
12c07b444c
commit
43fae0da64
1 file changed
+12
-4
+12
-4
@@ -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") {
|
||||
|
||||
Reference in new issue
Block a user