mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 16:30:55 +00:00
fix #252
This commit is contained in:
parent
5d54acba30
commit
0ddde6fa9f
@ -133,12 +133,12 @@ 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.HttpOnly = true
|
||||||
cookie.Path = "/"
|
//cookie.Path = "/"
|
||||||
if manager.maxage >= 0 {
|
//if manager.maxage >= 0 {
|
||||||
cookie.MaxAge = manager.maxage
|
// cookie.MaxAge = manager.maxage
|
||||||
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