mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-08 05:56:38 +00:00
fix create domain
This commit is contained in:
@@ -82,7 +82,7 @@ export async function createOrgDomain(
|
||||
)
|
||||
);
|
||||
}
|
||||
} else if (build == "enterprise" || build == "saas") {
|
||||
} else if (build == "saas") {
|
||||
if (type !== "ns" && type !== "cname") {
|
||||
return next(
|
||||
createHttpError(
|
||||
@@ -92,6 +92,7 @@ export async function createOrgDomain(
|
||||
);
|
||||
}
|
||||
}
|
||||
// allow wildacard, cname, and ns in enterprise
|
||||
|
||||
// Validate organization exists
|
||||
if (!isValidDomain(baseDomain)) {
|
||||
@@ -104,7 +105,7 @@ export async function createOrgDomain(
|
||||
// many providers dont allow cname for this. Lets prevent it for the user for now
|
||||
return next(
|
||||
createHttpError(
|
||||
HttpCode.BAD_REQUEST,
|
||||
HttpCode.BAD_REQUEST,
|
||||
"You cannot create a CNAME record on a root domain. RFC 1912 § 2.4 prohibits CNAME records at the zone apex. Please use a subdomain."
|
||||
)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user