Fixed sticky session bug

- Fixed sticky session bug in new active fallback lb implementation
This commit is contained in:
Toby Chui
2025-02-14 22:53:29 +08:00
parent 32f60dfba6
commit 5d8bec7f24
4 changed files with 39 additions and 7 deletions

View File

@@ -109,6 +109,11 @@ func GetUpstreamsAsString(upstreams []*Upstream) string {
return strings.Join(targets, ", ")
}
// Reset the current session store and clear all previous sessions
func (m *RouteManager) ResetSessions() {
m.SessionStore = sessions.NewCookieStore([]byte(m.Options.SystemUUID))
}
func (m *RouteManager) Close() {
//Close the session store
m.SessionStore.MaxAge(0)