Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 14, 05:15 UTC
reverseproxy: Set cookie path to `/` when using cookie lb_policy (#4096)
Dimitri Masson committed
Mar 30, 2021 at 23:29 UTC
bd357bf00507d0f81c8c401b1ffa7ccb1f7c00bf
1 file changed
+1
-1
modules/caddyhttp/reverseproxy/selectionpolicies.go
+1
-1
@@ -445,7 +445,7 @@ func selectNewHostWithCookieHashSelection(pool []*Upstream, w http.ResponseWrite
445
sha, err := hashCookie(cookieSecret, randomHost.Dial)
446
if err == nil {
447
// write the cookie.
448
- http.SetCookie(w, &http.Cookie{Name: cookieName, Value: sha, Secure: false})
448
+ http.SetCookie(w, &http.Cookie{Name: cookieName, Value: sha, Path: "/", Secure: false})
449
}
450
}
451
return randomHost