From f444b60d13959bf9a1994325ba8ff50be71f6f51 Mon Sep 17 00:00:00 2001 From: Oluwatobi Bamidele Date: Mon, 16 Dec 2024 18:03:01 +0100 Subject: [PATCH] chore: use sticky session for traifik --- src/images/traefik.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/images/traefik.rs b/src/images/traefik.rs index 5ce6a567..b80abf16 100644 --- a/src/images/traefik.rs +++ b/src/images/traefik.rs @@ -149,6 +149,15 @@ pub fn traefik_labels( name, shared_host )); def.push(format!("traefik.http.routers.{}.priority=2", name)); + def.push(format!( + "traefik.http.services.{}.loadBalancer.sticky.cookie.name=server_id", + name + )); + + def.push(format!( + "traefik.http.services.{}.loadBalancer.sticky.cookie.httpOnly=true", + name + )); } } else { def.push(format!(