update to use the formatCookieDomain

Former-commit-id: eb1f56c33dbf56bdc9d9e8df5f3f4915ff3cec42
This commit is contained in:
Gerasimos (Makis) Maropoulos 2018-04-22 14:00:08 +03:00 committed by GitHub
parent d4c20b8e2a
commit e09a7e32ed

View File

@ -43,7 +43,7 @@ func (s *Sessions) updateCookie(ctx context.Context, sid string, expires time.Du
cookie.Value = sid cookie.Value = sid
cookie.Path = "/" cookie.Path = "/"
cookie.Domain = FormatCookieDomain(ctx, s.config.DisableSubdomainPersistence) cookie.Domain = formatCookieDomain(ctx, s.config.DisableSubdomainPersistence)
cookie.HttpOnly = true cookie.HttpOnly = true
// MaxAge=0 means no 'Max-Age' attribute specified. // MaxAge=0 means no 'Max-Age' attribute specified.
// MaxAge<0 means delete cookie now, equivalently 'Max-Age: 0' // MaxAge<0 means delete cookie now, equivalently 'Max-Age: 0'