Added X-Session-ID cookie
This commit is contained in:
parent
9ce19b94b4
commit
a62d2287ae
@ -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) { // {{{
|
||||
|
Loading…
Reference in New Issue
Block a user