mirror of
https://github.com/astaxie/beego.git
synced 2024-10-31 23:10:56 +00:00
delete session's cookie Expires
This commit is contained in:
parent
8358e0ff48
commit
aa9cb6d052
@ -66,11 +66,11 @@ func (manager *Manager) SessionStart(w http.ResponseWriter, r *http.Request) (se
|
||||
Path: "/",
|
||||
HttpOnly: true,
|
||||
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)
|
||||
r.AddCookie(&cookie)
|
||||
} 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.Path = "/"
|
||||
http.SetCookie(w, cookie)
|
||||
|
Loading…
Reference in New Issue
Block a user