mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-28 13:48:13 +02:00
Update sticky session to show only with 2+ targets and use IP strategy for TCP
This commit is contained in:
parent
ac8e315fbd
commit
4a42aa385a
2 changed files with 18 additions and 14 deletions
|
@ -103,7 +103,10 @@ export async function traefikConfigProvider(
|
||||||
[badgerMiddlewareName]: {
|
[badgerMiddlewareName]: {
|
||||||
apiBaseUrl: new URL(
|
apiBaseUrl: new URL(
|
||||||
"/api/v1",
|
"/api/v1",
|
||||||
`http://${config.getRawConfig().server.internal_hostname}:${
|
`http://${
|
||||||
|
config.getRawConfig().server
|
||||||
|
.internal_hostname
|
||||||
|
}:${
|
||||||
config.getRawConfig().server
|
config.getRawConfig().server
|
||||||
.internal_port
|
.internal_port
|
||||||
}`
|
}`
|
||||||
|
@ -351,10 +354,9 @@ export async function traefikConfigProvider(
|
||||||
...(resource.stickySession
|
...(resource.stickySession
|
||||||
? {
|
? {
|
||||||
sticky: {
|
sticky: {
|
||||||
cookie: {
|
ipStrategy: {
|
||||||
name: "pangolin_sticky",
|
depth: 0,
|
||||||
secure: resource.ssl,
|
sourcePort: true
|
||||||
httpOnly: true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -493,6 +493,7 @@ export default function ReverseProxyTargets(props: {
|
||||||
</SettingsSectionDescription>
|
</SettingsSectionDescription>
|
||||||
</SettingsSectionHeader>
|
</SettingsSectionHeader>
|
||||||
<SettingsSectionBody>
|
<SettingsSectionBody>
|
||||||
|
{targets.length >= 2 && (
|
||||||
<SwitchInput
|
<SwitchInput
|
||||||
id="sticky-toggle"
|
id="sticky-toggle"
|
||||||
label="Enable Sticky Sessions"
|
label="Enable Sticky Sessions"
|
||||||
|
@ -502,6 +503,7 @@ export default function ReverseProxyTargets(props: {
|
||||||
await saveStickySession(val);
|
await saveStickySession(val);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
)}
|
||||||
<SwitchInput
|
<SwitchInput
|
||||||
id="ssl-toggle"
|
id="ssl-toggle"
|
||||||
label="Enable SSL (https)"
|
label="Enable SSL (https)"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue