Added cookie update on successful user check

This commit is contained in:
2017-10-07 16:06:35 +02:00
parent 895d831107
commit c41ab30851
+1
View File
@@ -60,6 +60,7 @@ func (router *Router) ServeHTTP(w http.ResponseWriter, req *http.Request) {
if user != nil {
user.Session = sess
http.SetCookie(w, &http.Cookie{Name: auth.SessionCookieName, Value: sess.ID, Expires: sess.Time.Add(auth.SessionMaxTime), Path: "/", HttpOnly: true})
}
}
}