mirror of
https://github.com/caddyserver/caddy.git
synced 2025-02-02 06:07:21 +01:00
reverseproxy: Set cookie path to /
when using cookie lb_policy (#4096)
This commit is contained in:
parent
aac1ccf12d
commit
bd357bf005
1 changed files with 1 additions and 1 deletions
|
@ -445,7 +445,7 @@ func selectNewHostWithCookieHashSelection(pool []*Upstream, w http.ResponseWrite
|
||||||
sha, err := hashCookie(cookieSecret, randomHost.Dial)
|
sha, err := hashCookie(cookieSecret, randomHost.Dial)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
// write the cookie.
|
// write the cookie.
|
||||||
http.SetCookie(w, &http.Cookie{Name: cookieName, Value: sha, Secure: false})
|
http.SetCookie(w, &http.Cookie{Name: cookieName, Value: sha, Path: "/", Secure: false})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return randomHost
|
return randomHost
|
||||||
|
|
Loading…
Reference in a new issue