diff --git a/server/routers/traefik/getTraefikConfig.ts b/server/routers/traefik/getTraefikConfig.ts index aee5e2a9..02dba188 100644 --- a/server/routers/traefik/getTraefikConfig.ts +++ b/server/routers/traefik/getTraefikConfig.ts @@ -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 } } } diff --git a/src/app/[orgId]/settings/resources/[resourceId]/connectivity/page.tsx b/src/app/[orgId]/settings/resources/[resourceId]/connectivity/page.tsx index bb238b68..18bb8f34 100644 --- a/src/app/[orgId]/settings/resources/[resourceId]/connectivity/page.tsx +++ b/src/app/[orgId]/settings/resources/[resourceId]/connectivity/page.tsx @@ -493,15 +493,17 @@ export default function ReverseProxyTargets(props: { - { - await saveStickySession(val); - }} - /> + {targets.length >= 2 && ( + { + await saveStickySession(val); + }} + /> + )}