Added cookie update on successful user check
This commit is contained in:
@@ -60,6 +60,7 @@ func (router *Router) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||||||
|
|
||||||
if user != nil {
|
if user != nil {
|
||||||
user.Session = sess
|
user.Session = sess
|
||||||
|
http.SetCookie(w, &http.Cookie{Name: auth.SessionCookieName, Value: sess.ID, Expires: sess.Time.Add(auth.SessionMaxTime), Path: "/", HttpOnly: true})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user