mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 13:10:54 +00:00
update session fix
This commit is contained in:
parent
6d96345499
commit
bf144d5835
@ -71,6 +71,8 @@ func (manager *Manager) SessionStart(w http.ResponseWriter, r *http.Request) (se
|
|||||||
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.Path = "/"
|
||||||
http.SetCookie(w, cookie)
|
http.SetCookie(w, cookie)
|
||||||
sid, _ := url.QueryUnescape(cookie.Value)
|
sid, _ := url.QueryUnescape(cookie.Value)
|
||||||
session, _ = manager.provider.SessionRead(sid)
|
session, _ = manager.provider.SessionRead(sid)
|
||||||
|
Loading…
Reference in New Issue
Block a user