diff --git a/web/pages/admin/config-federation.tsx b/web/pages/admin/config-federation.tsx
index f2ca41c3f..ca8237391 100644
--- a/web/pages/admin/config-federation.tsx
+++ b/web/pages/admin/config-federation.tsx
@@ -244,6 +244,18 @@ const ConfigFederation = () => {
/>
>
);
+
+ const invalidPortWarning = (
+
+ );
+
+ const hasInvalidPort =
+ instanceUrl && new URL(instanceUrl).port !== '' && new URL(instanceUrl).port !== '443';
+
return (
Configure Social Features
@@ -263,12 +275,13 @@ const ConfigFederation = () => {
{configurationWarning}
+ {hasInvalidPort && invalidPortWarning}
{
useSubmit
{...FIELD_PROPS_FEDERATION_NSFW}
checked={formDataValues.nsfw}
- disabled={!hasInstanceUrl}
+ disabled={hasInvalidPort || !hasInstanceUrl}
/>