bf144d58 by astaxie

update session fix

1 parent 6d963454
...@@ -71,6 +71,8 @@ func (manager *Manager) SessionStart(w http.ResponseWriter, r *http.Request) (se ...@@ -71,6 +71,8 @@ func (manager *Manager) SessionStart(w http.ResponseWriter, r *http.Request) (se
71 r.AddCookie(&cookie) 71 r.AddCookie(&cookie)
72 } else { 72 } else {
73 cookie.Expires = time.Now().Add(time.Duration(manager.maxlifetime) * time.Second) 73 cookie.Expires = time.Now().Add(time.Duration(manager.maxlifetime) * time.Second)
74 cookie.HttpOnly = true
75 cookie.Path = "/"
74 http.SetCookie(w, cookie) 76 http.SetCookie(w, cookie)
75 sid, _ := url.QueryUnescape(cookie.Value) 77 sid, _ := url.QueryUnescape(cookie.Value)
76 session, _ = manager.provider.SessionRead(sid) 78 session, _ = manager.provider.SessionRead(sid)
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!