Merge branch 'free-me-up' into aig

This commit is contained in:
Owen
2026-08-17 14:54:05 -04:00
86 changed files with 3321 additions and 3843 deletions
+3 -20
View File
@@ -24,14 +24,14 @@ import logger from "@server/logger";
import { subdomainSchema, wildcardSubdomainSchema } from "@server/lib/schemas";
import config from "@server/lib/config";
import { OpenAPITags, registry } from "@server/openApi";
import { createCertificate } from "#dynamic/routers/certificates/createCertificate";
import { createCertificate } from "@server/routers/certificates";
import {
validateAndConstructDomain,
checkWildcardDomainConflict
} from "@server/lib/domainUtils";
import { isSubscribed } from "#dynamic/lib/isSubscribed";
import { isLicensedOrSubscribed } from "#dynamic/lib/isLicencedOrSubscribed";
import { TierFeature, tierMatrix } from "@server/lib/billing/tierMatrix";
import { tierMatrix } from "@server/lib/billing/tierMatrix";
import {
getUniqueResourceName,
getUniqueResourcePolicyName
@@ -454,21 +454,6 @@ async function createHttpResource(
}
}
if (
["ssh", "rdp", "vnc"].includes(effectiveMode) &&
!isLicensedOrSubscribed(
orgId!,
tierMatrix[TierFeature.AdvancedPublicResources]
)
) {
return next(
createHttpError(
HttpCode.BAD_REQUEST,
"Your current subscription does not support browser gateway resources. Please upgrade to access this feature."
)
);
}
// Validate domain and construct full domain
const domainResult = await validateAndConstructDomain(
domainId,
@@ -647,9 +632,7 @@ async function createHttpResource(
);
}
if (build !== "oss") {
await createCertificate(domainId, fullDomain, db);
}
await createCertificate(domainId, fullDomain, db);
return response<CreateResourceResponse>(res, {
data: resource,
+2 -4
View File
@@ -38,7 +38,7 @@ import {
} from "@server/lib/schemas";
import { registry } from "@server/openApi";
import { OpenAPITags } from "@server/openApi";
import { createCertificate } from "#dynamic/routers/certificates/createCertificate";
import { createCertificate } from "@server/routers/certificates/createCertificate";
import {
validateAndConstructDomain,
checkWildcardDomainConflict
@@ -678,9 +678,7 @@ async function updateHttpResource(
// Update the subdomain in the update data
updateData.subdomain = finalSubdomain;
if (build != "oss") {
await createCertificate(domainId, fullDomain, db);
}
await createCertificate(domainId, fullDomain, db);
}
let headers = undefined;