From c41ab3085105ac62d42cb8ee714c2698824f5e68 Mon Sep 17 00:00:00 2001 From: Gisle Aune Date: Sat, 7 Oct 2017 16:06:35 +0200 Subject: [PATCH] Added cookie update on successful user check --- router.go | 1 + 1 file changed, 1 insertion(+) diff --git a/router.go b/router.go index 9479965..c93ca9b 100644 --- a/router.go +++ b/router.go @@ -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}) } } }