mirror of
https://github.com/tiennm99/is-a-dev.git
synced 2026-06-01 02:17:53 +00:00
feat(validation): gitlab verification
This commit is contained in:
@@ -64,6 +64,7 @@ describe('validateDomainData', () => {
|
||||
{ ...defaultDomain, record: { AAAA: '182.22.222.22' } },
|
||||
{ ...defaultDomain, record: { A: '::1' } },
|
||||
{ ...defaultDomain, name: '_discord' },
|
||||
{ ...defaultDomain, name: '_gitlab-pages-verification-code' },
|
||||
];
|
||||
|
||||
const validCases = [
|
||||
@@ -94,6 +95,7 @@ describe('validateDomainData', () => {
|
||||
{ ...defaultDomain, record: { AAAA: ['::1', '2001:db8:3333:4444:5555:6666:7777:8888'] } },
|
||||
{ ...defaultDomain, record: { A: ['122.222.222.222'] } },
|
||||
{ ...defaultDomain, name: '_discord.subdomain' },
|
||||
{ ...defaultDomain, name: '_gitlab-pages-verification-code.subdomain' },
|
||||
];
|
||||
|
||||
it('should return false for invalid data', () => {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
"_acme-challenge",
|
||||
"_github-challenge-is-a-dev",
|
||||
"_github-pages-challenge-is-a-dev",
|
||||
"_gitlab-pages-verification-code",
|
||||
"help",
|
||||
"no-reply",
|
||||
"noreply",
|
||||
|
||||
@@ -39,6 +39,7 @@ const checkRestrictedNames = R.complement(R.includes(R.__, INVALID_NAMES))
|
||||
const extraSupportedNames = [
|
||||
testRegex(/^_github(-pages)?-challenge-[a-z0-9-_]+$/i), // Exception for github verification records
|
||||
R.equals('_discord'),
|
||||
R.equals('_gitlab-pages-verification-code'),
|
||||
]
|
||||
|
||||
const validateDomainData = validate({
|
||||
|
||||
Reference in New Issue
Block a user