mirror of
https://github.com/fosrl/pangolin.git
synced 2026-04-28 08:46:59 +00:00
Adding guiderails
This commit is contained in:
@@ -24,7 +24,7 @@ import {
|
||||
import { registry } from "@server/openApi";
|
||||
import { OpenAPITags } from "@server/openApi";
|
||||
import { createCertificate } from "#dynamic/routers/certificates/createCertificate";
|
||||
import { validateAndConstructDomain } from "@server/lib/domainUtils";
|
||||
import { validateAndConstructDomain, checkWildcardDomainConflict } from "@server/lib/domainUtils";
|
||||
import { build } from "@server/build";
|
||||
import { isLicensedOrSubscribed } from "#dynamic/lib/isLicencedOrSubscribed";
|
||||
import { tierMatrix } from "@server/lib/billing/tierMatrix";
|
||||
@@ -410,6 +410,16 @@ async function updateHttpResource(
|
||||
);
|
||||
}
|
||||
|
||||
const wildcardConflict = await checkWildcardDomainConflict(
|
||||
fullDomain,
|
||||
resource.resourceId
|
||||
);
|
||||
if (wildcardConflict.conflict) {
|
||||
return next(
|
||||
createHttpError(HttpCode.CONFLICT, wildcardConflict.message)
|
||||
);
|
||||
}
|
||||
|
||||
// Prevent updating resource with same domain as dashboard
|
||||
const dashboardUrl = config.getRawConfig().app.dashboard_url;
|
||||
if (dashboardUrl) {
|
||||
|
||||
Reference in New Issue
Block a user