mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-01 07:39:09 +00:00
Update sticky session to show only with 2+ targets and use IP strategy for TCP
This commit is contained in:
@@ -103,7 +103,10 @@ export async function traefikConfigProvider(
|
||||
[badgerMiddlewareName]: {
|
||||
apiBaseUrl: new URL(
|
||||
"/api/v1",
|
||||
`http://${config.getRawConfig().server.internal_hostname}:${
|
||||
`http://${
|
||||
config.getRawConfig().server
|
||||
.internal_hostname
|
||||
}:${
|
||||
config.getRawConfig().server
|
||||
.internal_port
|
||||
}`
|
||||
@@ -351,10 +354,9 @@ export async function traefikConfigProvider(
|
||||
...(resource.stickySession
|
||||
? {
|
||||
sticky: {
|
||||
cookie: {
|
||||
name: "pangolin_sticky",
|
||||
secure: resource.ssl,
|
||||
httpOnly: true
|
||||
ipStrategy: {
|
||||
depth: 0,
|
||||
sourcePort: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)"
|
||||
|
||||
Reference in New Issue
Block a user