Browse Source

Added cookie update on successful user check

master
Gisle Aune 7 years ago
parent
commit
c41ab30851
  1. 1
      router.go

1
router.go

@ -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})
} }
} }
} }

Loading…
Cancel
Save