Update sticky session to show only with 2+ targets and use IP strategy for TCP

This commit is contained in:
Matthew Evans
2025-04-13 15:29:53 -04:00
parent ac8e315fbd
commit 4a42aa385a
2 changed files with 18 additions and 14 deletions

View File

@@ -493,15 +493,17 @@ export default function ReverseProxyTargets(props: {
</SettingsSectionDescription>
</SettingsSectionHeader>
<SettingsSectionBody>
<SwitchInput
id="sticky-toggle"
label="Enable Sticky Sessions"
description="Keep users on the same backend target for their entire session. Useful for applications like VNC that require persistent connections."
defaultChecked={resource.stickySession}
onCheckedChange={async (val) => {
await saveStickySession(val);
}}
/>
{targets.length >= 2 && (
<SwitchInput
id="sticky-toggle"
label="Enable Sticky Sessions"
description="Keep users on the same backend target for their entire session. Useful for applications like VNC that require persistent connections."
defaultChecked={resource.stickySession}
onCheckedChange={async (val) => {
await saveStickySession(val);
}}
/>
)}
<SwitchInput
id="ssl-toggle"
label="Enable SSL (https)"