summaryrefslogtreecommitdiff
path: root/modules/caddyhttp
diff options
context:
space:
mode:
authorDimitri Masson <30894448+d-masson@users.noreply.github.com>2021-03-30 23:29:00 +0200
committerGitHub <noreply@github.com>2021-03-30 15:29:00 -0600
commitbd357bf00507d0f81c8c401b1ffa7ccb1f7c00bf (patch)
tree1aff8d9722f8d36565a9f6492f844c38fda1912f /modules/caddyhttp
parentaac1ccf12d0076ce7ae2b67ed9cbdf55dc99e14e (diff)
reverseproxy: Set cookie path to `/` when using cookie lb_policy (#4096)
Diffstat (limited to 'modules/caddyhttp')
-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 dacfd11..357ee33 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