diff --git a/src/app/[orgId]/settings/resources/proxy/[niceId]/general/page.tsx b/src/app/[orgId]/settings/resources/proxy/[niceId]/general/page.tsx index 7cf9339b..d8f050d3 100644 --- a/src/app/[orgId]/settings/resources/proxy/[niceId]/general/page.tsx +++ b/src/app/[orgId]/settings/resources/proxy/[niceId]/general/page.tsx @@ -164,6 +164,10 @@ function MaintenanceSectionForm({ return isEnterpriseNotLicensed || isSaasNotSubscribed; }; + if (!resource.http) { + return null; + } + return ( @@ -437,9 +441,16 @@ export default function GeneralForm() { ); const resourceFullDomainName = useMemo(() => { - const url = new URL(resourceFullDomain); - return url.hostname; - }, [resourceFullDomain]); + if (!resource.fullDomain) { + return ""; + } + try { + const url = new URL(resourceFullDomain); + return url.hostname; + } catch { + return ""; + } + }, [resourceFullDomain, resource.fullDomain]); const [selectedDomain, setSelectedDomain] = useState<{ domainId: string; diff --git a/src/components/ResourceInfoBox.tsx b/src/components/ResourceInfoBox.tsx index 6ef7521f..187edb5b 100644 --- a/src/components/ResourceInfoBox.tsx +++ b/src/components/ResourceInfoBox.tsx @@ -32,12 +32,6 @@ export default function ResourceInfoBox({}: ResourceInfoBoxType) { - - URL - - - - {t("identifier")} @@ -46,6 +40,12 @@ export default function ResourceInfoBox({}: ResourceInfoBoxType) { {resource.http ? ( <> + + URL + + + + {t("authentication")}