mirror of
https://github.com/tiennm99/is-a-dev.git
synced 2026-05-25 17:57:36 +00:00
remove @ + www json files, update reserved
This commit is contained in:
+5
-3
@@ -50,8 +50,7 @@ for (var subdomain in domains) {
|
||||
|
||||
// Handle CNAME records
|
||||
if (domainData.record.CNAME) {
|
||||
// Use ALIAS instead of CNAME to support CNAME flattening on the root domain
|
||||
records.push(ALIAS(subdomainName, domainData.record.CNAME + ".", proxyState));
|
||||
records.push(CNAME(subdomainName, domainData.record.CNAME + ".", proxyState));
|
||||
}
|
||||
|
||||
// Handle DS records
|
||||
@@ -147,7 +146,8 @@ for (var i = 0; i < reserved.length; i++) {
|
||||
subdomainName !== "ns1" &&
|
||||
subdomainName !== "ns2" &&
|
||||
subdomainName !== "ns3" &&
|
||||
subdomainName !== "ns4"
|
||||
subdomainName !== "ns4" &&
|
||||
subdomainName !== "www"
|
||||
) {
|
||||
records.push(A(subdomainName, IP("192.0.2.1"), CF_PROXY_ON));
|
||||
}
|
||||
@@ -159,6 +159,7 @@ var options = {
|
||||
|
||||
var ignored = [
|
||||
IGNORE("*._domainkey", "TXT"),
|
||||
IGNORE("@", "*"),
|
||||
IGNORE("_acme-challenge", "TXT"),
|
||||
IGNORE("_autodiscover._tcp", "SRV"),
|
||||
IGNORE("_dmarc", "TXT"),
|
||||
@@ -166,6 +167,7 @@ var ignored = [
|
||||
IGNORE("autoconfig", "CNAME"),
|
||||
IGNORE("autodiscover", "CNAME"),
|
||||
IGNORE("ns[1-4]", "A,AAAA"),
|
||||
IGNORE("www", "*")
|
||||
];
|
||||
|
||||
// Push TXT record of when the zone was last updated
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "is-a-dev",
|
||||
"email": "admin@is-a.dev"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "is-a-dev.github.io",
|
||||
"MX": ["mail.hrsn.net"],
|
||||
"TXT": ["v=spf1 include:_spf.hrsn.net -all"]
|
||||
},
|
||||
"redirect_config": {
|
||||
"custom_paths": {
|
||||
"/discord": "https://discord.gg/is-a-dev-830872854677422150",
|
||||
"/docs": "https://docs.is-a.dev",
|
||||
"/donate": "https://wdh.gg/pvNCdvs",
|
||||
"/donate/ns": "https://wdh.gg/pvNCdvs",
|
||||
"/donate/sponsor": "https://wdh.gg/sponsor",
|
||||
"/github": "https://github.com/is-a-dev",
|
||||
"/register": "https://github.com/is-a-dev/register"
|
||||
}
|
||||
},
|
||||
"proxied": true
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "is-a-dev",
|
||||
"email": "admin@is-a.dev"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "is-a.dev"
|
||||
},
|
||||
"proxied": true
|
||||
}
|
||||
+14
-16
@@ -97,25 +97,23 @@ async function validateFileName(t, file) {
|
||||
t.false(file.includes("--"), `${file}: File name should not contain consecutive hyphens`);
|
||||
t.false(file.startsWith("_redirect."), `${file}: File name should not start with _redirect`);
|
||||
|
||||
if (file !== "@.json") {
|
||||
const subdomain = file.replace(/\.json$/, "");
|
||||
const subdomain = file.replace(/\.json$/, "");
|
||||
|
||||
t.regex(
|
||||
subdomain + ".is-a.dev",
|
||||
hostnameRegex,
|
||||
`${file}: FQDN must be 1-253 characters, can use letters, numbers, dots, and non-consecutive hyphens.`
|
||||
);
|
||||
t.false(reservedDomains.includes(subdomain), `${file}: Subdomain name is reserved`);
|
||||
t.true(
|
||||
!reservedDomains.some((reserved) => subdomain.endsWith(`.${reserved}`)),
|
||||
`${file}: Subdomain name is reserved`
|
||||
);
|
||||
t.regex(
|
||||
subdomain + ".is-a.dev",
|
||||
hostnameRegex,
|
||||
`${file}: FQDN must be 1-253 characters, can use letters, numbers, dots, and non-consecutive hyphens.`
|
||||
);
|
||||
t.false(reservedDomains.includes(subdomain), `${file}: Subdomain name is reserved`);
|
||||
t.true(
|
||||
!reservedDomains.some((reserved) => subdomain.endsWith(`.${reserved}`)),
|
||||
`${file}: Subdomain name is reserved`
|
||||
);
|
||||
|
||||
const rootSubdomain = subdomain.split(".").pop();
|
||||
const rootSubdomain = subdomain.split(".").pop();
|
||||
|
||||
if (!excludedDomains.includes(rootSubdomain)) {
|
||||
t.false(rootSubdomain.startsWith("_"), `${file}: Root subdomains should not start with an underscore`);
|
||||
}
|
||||
if (!excludedDomains.includes(rootSubdomain)) {
|
||||
t.false(rootSubdomain.startsWith("_"), `${file}: Root subdomains should not start with an underscore`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -147,11 +147,9 @@ function validateRecordValues(t, data, file) {
|
||||
);
|
||||
t.notThrows(() => new URL(value), `${file}: Invalid URL for ${key}`);
|
||||
|
||||
// Check for self-referencing redirects
|
||||
const urlHost = new URL(value).host;
|
||||
const isSelfReferencing =
|
||||
file === "@.json" ? urlHost === "is-a.dev" : urlHost === `${subdomain}.is-a.dev`;
|
||||
|
||||
t.false(isSelfReferencing, `${file}: URL cannot point to itself`);
|
||||
t.false(urlHost === `${subdomain}.is-a.dev`, `${file}: URL cannot point to itself`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -264,8 +262,7 @@ function validateRecordValues(t, data, file) {
|
||||
|
||||
// Check for self-referencing redirects
|
||||
const urlHost = new URL(customRedirectURL).host;
|
||||
const isSelfReferencing = file === "@.json" ? urlHost === "is-a.dev" : urlHost === `${subdomain}.is-a.dev`;
|
||||
t.false(isSelfReferencing, `${urlMessage} cannot point to itself at index ${idx}`);
|
||||
t.false(urlHost === `${subdomain}.is-a.dev`, `${urlMessage} cannot point to itself at index ${idx}`);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
+2
-65
@@ -2,26 +2,16 @@
|
||||
"about",
|
||||
"account",
|
||||
"accounts",
|
||||
"ad",
|
||||
"admin",
|
||||
"ads",
|
||||
"api",
|
||||
"apis",
|
||||
"app",
|
||||
"apps",
|
||||
"asset",
|
||||
"assets",
|
||||
"auth",
|
||||
"authentication",
|
||||
"authorisation",
|
||||
"authorise",
|
||||
"authorization",
|
||||
"authorize",
|
||||
"autoconfig",
|
||||
"autodiscover",
|
||||
"billing",
|
||||
"blog",
|
||||
"board",
|
||||
"bot",
|
||||
"cdn",
|
||||
"chat",
|
||||
@@ -29,9 +19,6 @@
|
||||
"cname",
|
||||
"co",
|
||||
"com",
|
||||
"con",
|
||||
"contribute",
|
||||
"contributing",
|
||||
"dash",
|
||||
"dashboard",
|
||||
"dns",
|
||||
@@ -39,45 +26,26 @@
|
||||
"documentation",
|
||||
"domain",
|
||||
"email",
|
||||
"event",
|
||||
"events",
|
||||
"example",
|
||||
"feedback",
|
||||
"file",
|
||||
"files",
|
||||
"get",
|
||||
"help",
|
||||
"helper",
|
||||
"helpers",
|
||||
"home",
|
||||
"host",
|
||||
"hosting",
|
||||
"hostmaster",
|
||||
"http",
|
||||
"https",
|
||||
"info",
|
||||
"int",
|
||||
"internal",
|
||||
"legal",
|
||||
"license",
|
||||
"login",
|
||||
"lpt1",
|
||||
"lpt2",
|
||||
"lpt3",
|
||||
"lpt4",
|
||||
"lpt5",
|
||||
"lpt6",
|
||||
"lpt7",
|
||||
"lpt8",
|
||||
"lpt9",
|
||||
"m",
|
||||
"mail",
|
||||
"maintainer",
|
||||
"maintainers",
|
||||
"media",
|
||||
"mobile",
|
||||
"moderator",
|
||||
"moderators",
|
||||
"net",
|
||||
"network",
|
||||
"news",
|
||||
@@ -97,17 +65,11 @@
|
||||
"ns8",
|
||||
"ns9",
|
||||
"oauth",
|
||||
"online",
|
||||
"ops",
|
||||
"org",
|
||||
"owner",
|
||||
"pay",
|
||||
"payment",
|
||||
"payments",
|
||||
"poll",
|
||||
"polls",
|
||||
"portal",
|
||||
"postmaster",
|
||||
"preview",
|
||||
"private",
|
||||
"prod",
|
||||
@@ -129,7 +91,6 @@
|
||||
"staff",
|
||||
"staging",
|
||||
"static",
|
||||
"statistics",
|
||||
"stats",
|
||||
"status",
|
||||
"store",
|
||||
@@ -137,39 +98,15 @@
|
||||
"support",
|
||||
"sys",
|
||||
"system",
|
||||
"team",
|
||||
"test",
|
||||
"terms",
|
||||
"token",
|
||||
"tokens",
|
||||
"tos",
|
||||
"url",
|
||||
"vote",
|
||||
"web",
|
||||
"webmail",
|
||||
"webmaster",
|
||||
"website",
|
||||
"whois",
|
||||
"ww",
|
||||
"ww0",
|
||||
"ww1",
|
||||
"ww2",
|
||||
"ww3",
|
||||
"ww4",
|
||||
"ww5",
|
||||
"ww6",
|
||||
"ww7",
|
||||
"ww8",
|
||||
"ww9",
|
||||
"www0",
|
||||
"www1",
|
||||
"www2",
|
||||
"www3",
|
||||
"www4",
|
||||
"www5",
|
||||
"www6",
|
||||
"www7",
|
||||
"www8",
|
||||
"www9",
|
||||
"www",
|
||||
"wwww",
|
||||
"your-domain-name",
|
||||
"zone"
|
||||
|
||||
Reference in New Issue
Block a user