Setting the Cookie Path explicitly to root

This commit is contained in:
Marco Paga 2017-08-13 11:34:34 +02:00 committed by Traefiker
parent 50dd2b8cff
commit 60a35c8aba
3 changed files with 5 additions and 5 deletions

View file

@ -38,7 +38,7 @@ func (s *StickySession) GetBackend(req *http.Request, servers []*url.URL) (*url.
}
func (s *StickySession) StickBackend(backend *url.URL, w *http.ResponseWriter) {
c := &http.Cookie{Name: s.cookiename, Value: backend.String()}
c := &http.Cookie{Name: s.cookiename, Value: backend.String(), Path: "/"}
http.SetCookie(*w, c)
return
}