mirror of
https://github.com/tiennm99/is-a-dev.git
synced 2026-10-19 04:16:08 +00:00
add test for TXT record when vercel
This commit is contained in:
1 parent
190ec8d207
commit
4d82df2e2f
1 file changed
+9
@@ -238,6 +238,15 @@ function validateRecordValues(t, data, file) {
|
|||||||
const values = Array.isArray(value) ? value : [value];
|
const values = Array.isArray(value) ? value : [value];
|
||||||
values.forEach((record, idx) => {
|
values.forEach((record, idx) => {
|
||||||
t.true(typeof record === "string", `${file}: TXT record value should be a string at index ${idx}`);
|
t.true(typeof record === "string", `${file}: TXT record value should be a string at index ${idx}`);
|
||||||
|
|
||||||
|
if (record.startsWith("vc-domain-verify=")) {
|
||||||
|
const domainToken = record.split("vc-domain-verify=")[1].split(",")[0];
|
||||||
|
|
||||||
|
t.true(
|
||||||
|
domainToken.endsWith(".is-a.dev"),
|
||||||
|
`${file}: Vercel TXT verification must target a subdomain of is-a.dev`
|
||||||
|
);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in new issue
Block a user