1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 18:00:55 +00:00

delete session's cookie Expires

This commit is contained in:
astaxie 2013-06-25 23:08:47 +08:00
parent 8358e0ff48
commit aa9cb6d052

View File

@ -66,11 +66,11 @@ func (manager *Manager) SessionStart(w http.ResponseWriter, r *http.Request) (se
Path: "/", Path: "/",
HttpOnly: true, HttpOnly: true,
Secure: false} Secure: false}
cookie.Expires = time.Now().Add(time.Duration(manager.maxlifetime) * time.Second) //cookie.Expires = time.Now().Add(time.Duration(manager.maxlifetime) * time.Second)
http.SetCookie(w, &cookie) http.SetCookie(w, &cookie)
r.AddCookie(&cookie) r.AddCookie(&cookie)
} else { } else {
cookie.Expires = time.Now().Add(time.Duration(manager.maxlifetime) * time.Second) //cookie.Expires = time.Now().Add(time.Duration(manager.maxlifetime) * time.Second)
cookie.HttpOnly = true cookie.HttpOnly = true
cookie.Path = "/" cookie.Path = "/"
http.SetCookie(w, cookie) http.SetCookie(w, cookie)