Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

Do not allow enabling federation features on if not port 443. Closes #2008

Gabe Kangas41eea167d83c
diff --git a/web/pages/admin/config-federation.tsx b/web/pages/admin/config-federation.tsx
index f2ca41c3f8..ca82373919 100644
--- a/web/pages/admin/config-federation.tsx
+++ b/web/pages/admin/config-federation.tsx
@@ -244,6 +244,18 @@ const ConfigFederation = () => {
/>
</>
);
+
+ const invalidPortWarning = (
+ <Alert
+ message="Only Owncast instances available on the default SSL port 443 support this feature."
+ type="warning"
+ showIcon
+ />
+ );
+
+ const hasInvalidPort =
+ instanceUrl && new URL(instanceUrl).port !== '' && new URL(instanceUrl).port !== '443';
+
return (
<div>
<Title>Configure Social Features</Title>
@@ -263,12 +275,13 @@ const ConfigFederation = () => {
<Row>
<Col span={15} className="form-module" style={{ marginRight: '15px' }}>
{configurationWarning}
+ {hasInvalidPort && invalidPortWarning}
<ToggleSwitch
fieldName="enabled"
onChange={handleEnabledSwitchChange}
{...FIELD_PROPS_ENABLE_FEDERATION}
checked={formDataValues.enabled}
- disabled={!hasInstanceUrl || !isInstanceUrlSecure}
+ disabled={hasInvalidPort || !hasInstanceUrl || !isInstanceUrlSecure}
/>
<ToggleSwitch
fieldName="isPrivate"
@@ -281,7 +294,7 @@ const ConfigFederation = () => {
useSubmit
{...FIELD_PROPS_FEDERATION_NSFW}
checked={formDataValues.nsfw}
- disabled={!hasInstanceUrl}
+ disabled={hasInvalidPort || !hasInstanceUrl}
/>
<TextFieldWithSubmit
required