mirror of
https://github.com/tiennm99/is-a-dev.git
synced 2026-10-13 06:15:34 +00:00
chore: even stricted validation
This commit is contained in:
1 parent
b231d3ac08
commit
556d8db5a5
1 file changed
+4
-2
@@ -246,10 +246,12 @@ function validateRecordValues(t, data, file) {
|
||||
);
|
||||
|
||||
const domainToken = record.split("vc-domain-verify=")[1].split(",")[0];
|
||||
const targetName = file.replace(/^_vercel\./, "").replace(/\.json$/, "");
|
||||
const expectedDomain = `${targetName}.is-a.dev`;
|
||||
|
||||
t.true(
|
||||
domainToken.endsWith(".is-a.dev"),
|
||||
`${file}: Vercel TXT verification must target a subdomain of is-a.dev`
|
||||
domainToken === expectedDomain || domainToken.endsWith(`.${expectedDomain}`),
|
||||
`${file}: Vercel TXT record domain (${domainToken}) must be '${expectedDomain}' or end with '.${expectedDomain}'`
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user