diff --git a/session.go b/session.go index 5608ab7..7b4afc7 100644 --- a/session.go +++ b/session.go @@ -75,6 +75,13 @@ func (service *Service) sessionNew(w http.ResponseWriter, r *http.Request, foo * }, ) + cookie := http.Cookie{} + cookie.Name = "X-Session-ID" + cookie.Value = sess.UUID + cookie.MaxAge = 86400 * 365 + cookie.Path = "/" + http.SetCookie(w, &cookie) + w.Write(respJSON) } // }}} func (service *Service) sessionAuthenticate(w http.ResponseWriter, r *http.Request, sess *session.T) { // {{{