Commit 0ddde6fa authored by astaxie's avatar astaxie

fix #252

parent 5d54acba
......@@ -133,12 +133,12 @@ func (manager *Manager) SessionStart(w http.ResponseWriter, r *http.Request) (se
r.AddCookie(cookie)
} else {
//cookie.Expires = time.Now().Add(time.Duration(manager.maxlifetime) * time.Second)
cookie.HttpOnly = true
cookie.Path = "/"
if manager.maxage >= 0 {
cookie.MaxAge = manager.maxage
http.SetCookie(w, cookie)
}
//cookie.HttpOnly = true
//cookie.Path = "/"
//if manager.maxage >= 0 {
// cookie.MaxAge = manager.maxage
// http.SetCookie(w, cookie)
//}
sid, _ := url.QueryUnescape(cookie.Value)
session, _ = manager.provider.SessionRead(sid)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment