fix create domain

This commit is contained in:
miloschwartz
2025-10-13 15:08:48 -07:00
parent 38faf1f905
commit e5ee96cf52
2 changed files with 5 additions and 4 deletions

View File

@@ -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."
)
);

View File

@@ -70,7 +70,7 @@ export function PathMatchModal({
Set up how incoming requests should be matched based on their path.
</CredenzaDescription>
</CredenzaHeader>
<div className="grid gap-4 py-4">
<div className="grid gap-4">
<div className="grid gap-2">
<Label htmlFor="match-type">Match Type</Label>
<Select value={matchType} onValueChange={setMatchType}>
@@ -181,7 +181,7 @@ export function PathRewriteModal({
Transform the matched path before forwarding to the target.
</CredenzaDescription>
</CredenzaHeader>
<div className="grid gap-4 py-4">
<div className="grid gap-4">
<div className="grid gap-2">
<Label htmlFor="rewrite-type">Rewrite Type</Label>
<Select value={rewriteType} onValueChange={setRewriteType}>