Skip to content

Commit

Permalink
Updated verify_jsons.js
Browse files Browse the repository at this point in the history
  • Loading branch information
YazeedT committed Jul 13, 2024
1 parent ac3cc23 commit c0e6fd1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions scripts/verify_jsons.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,20 @@ function isValidEmail(email) {
function verifySubdomainMatch(subdomain, filePath) {
const fileName = path.basename(filePath);
const fileNameSubdomain = fileName.split('.')[0];

// Special cases that should bypass the subdomain match check
const specialCases = ["purelymail1._domainkey", "purelymail2._domainkey", "purelymail3._domainkey"];

// Check if the subdomain is in the list of special cases
if (specialCases.includes(subdomain.toLowerCase())) {
return true;
}

// Check if the filename subdomain matches the provided subdomain
if (fileNameSubdomain.toLowerCase() === subdomain.toLowerCase()) {
return true;
}

return false;
}

Expand Down

0 comments on commit c0e6fd1

Please sign in to comment.