fix(lib): use a new cookie per domain when COOKIE_DOMAIN is set (#490)
Also properly re-brand the cookies so that some of the /x/ heritage is lost. This will invalidate existing cookies and probably affects tests. Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
parent
9009596ded
commit
6c0ff3f4d5
5 changed files with 20 additions and 8 deletions
|
|
@ -198,13 +198,13 @@ func TestCookieCustomExpiration(t *testing.T) {
|
|||
var ckie *http.Cookie
|
||||
for _, cookie := range resp.Cookies() {
|
||||
t.Logf("%#v", cookie)
|
||||
if cookie.Name == anubis.CookieName {
|
||||
if cookie.Name == srv.cookieName {
|
||||
ckie = cookie
|
||||
break
|
||||
}
|
||||
}
|
||||
if ckie == nil {
|
||||
t.Errorf("Cookie %q not found", anubis.CookieName)
|
||||
t.Errorf("Cookie %q not found", srv.cookieName)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -288,13 +288,13 @@ func TestCookieSettings(t *testing.T) {
|
|||
var ckie *http.Cookie
|
||||
for _, cookie := range resp.Cookies() {
|
||||
t.Logf("%#v", cookie)
|
||||
if cookie.Name == anubis.CookieName {
|
||||
if cookie.Name == srv.cookieName {
|
||||
ckie = cookie
|
||||
break
|
||||
}
|
||||
}
|
||||
if ckie == nil {
|
||||
t.Errorf("Cookie %q not found", anubis.CookieName)
|
||||
t.Errorf("Cookie %q not found", srv.cookieName)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue