move invalid domains to seperate file

This commit is contained in:
William Harrison authored and GitHub committed 2022-11-04 16:51:07 +08:00
1 parent ca8d3f6db8
commit 83a017a614
2 files changed
+19 -19

No files matched your search

+1 -19
View File
@@ -1,28 +1,10 @@
const fs = require("fs");
const invalidDomains = require("./invalid-domains.json");
function getFileExtension(filename) {
return (/[.]/.exec(filename)) ? /[^.]+$/.exec(filename) : undefined;
}
const invalidDomains = [
"_acme-challenge",
"_github-challenge-is-a-good-dev",
"_github-pages-challenge-is-a-good-dev",
"help",
"no-reply",
"noreply",
"notification",
"notifications",
"support",
"ww",
"ww1",
"ww2",
"ww3",
"ww4",
"wwww",
"your-domain-name"
]
function getJSON(file, filename) {
const path = `${process.env.actions_path}/${file}`; // File path.
const ext = getFileExtension(file);
+18
View File
@@ -0,0 +1,18 @@
[
"_acme-challenge",
"_github-challenge-is-a-good-dev",
"_github-pages-challenge-is-a-good-dev",
"help",
"no-reply",
"noreply",
"notification",
"notifications",
"support",
"ww",
"ww1",
"ww2",
"ww3",
"ww4",
"wwww",
"your-domain-name"
]