Compare commits
2 Commits
9ce19b94b4
...
aecafc2986
Author | SHA1 | Date | |
---|---|---|---|
aecafc2986 | |||
a62d2287ae |
2
pkg.go
2
pkg.go
@ -64,7 +64,7 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
const VERSION = "v0.2.12"
|
||||
const VERSION = "v0.2.13"
|
||||
|
||||
type HttpHandler func(http.ResponseWriter, *http.Request)
|
||||
|
||||
|
@ -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