aboutsummaryrefslogtreecommitdiffhomepage
path: root/modules/caddyhttp/reverseproxy/selectionpolicies.go
diff options
context:
space:
mode:
authorDimitri Masson <[email protected]>2021-03-30 23:29:00 +0200
committerGitHub <[email protected]>2021-03-30 15:29:00 -0600
commitbd357bf00507d0f81c8c401b1ffa7ccb1f7c00bf (patch)
tree1aff8d9722f8d36565a9f6492f844c38fda1912f /modules/caddyhttp/reverseproxy/selectionpolicies.go
parentaac1ccf12d0076ce7ae2b67ed9cbdf55dc99e14e (diff)
downloadcaddy-bd357bf00507d0f81c8c401b1ffa7ccb1f7c00bf.tar.gz
caddy-bd357bf00507d0f81c8c401b1ffa7ccb1f7c00bf.zip
reverseproxy: Set cookie path to `/` when using cookie lb_policy (#4096)
Diffstat (limited to 'modules/caddyhttp/reverseproxy/selectionpolicies.go')
-rw-r--r--modules/caddyhttp/reverseproxy/selectionpolicies.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/caddyhttp/reverseproxy/selectionpolicies.go b/modules/caddyhttp/reverseproxy/selectionpolicies.go
index dacfd1188..357ee33a9 100644
--- a/modules/caddyhttp/reverseproxy/selectionpolicies.go
+++ b/modules/caddyhttp/reverseproxy/selectionpolicies.go
@@ -445,7 +445,7 @@ func selectNewHostWithCookieHashSelection(pool []*Upstream, w http.ResponseWrite
sha, err := hashCookie(cookieSecret, randomHost.Dial)
if err == nil {
// 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