Change logging
This commit is contained in:
parent
c098abf14f
commit
c2e6612647
1 changed files with 2 additions and 7 deletions
|
|
@ -49,13 +49,6 @@ func (s *SessionStore) Logout(w http.ResponseWriter, r *http.Request) {
|
||||||
func (s *SessionStore) AsMiddleware(next http.Handler) http.Handler {
|
func (s *SessionStore) AsMiddleware(next http.Handler) http.Handler {
|
||||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||||
sessionCookie, err := r.Cookie("id")
|
sessionCookie, err := r.Cookie("id")
|
||||||
|
|
||||||
for name, values := range r.Header {
|
|
||||||
for _, value := range values {
|
|
||||||
fmt.Println(name, value)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// No session yet
|
// No session yet
|
||||||
if err != nil {
|
if err != nil {
|
||||||
user := r.Header.Get("X-Auth-Request-User")
|
user := r.Header.Get("X-Auth-Request-User")
|
||||||
|
|
@ -67,6 +60,8 @@ func (s *SessionStore) AsMiddleware(next http.Handler) http.Handler {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fmt.Println(sessionCookie.Value)
|
||||||
|
|
||||||
session, ok := s.sessions[sessionCookie.Value]
|
session, ok := s.sessions[sessionCookie.Value]
|
||||||
|
|
||||||
// Session expired
|
// Session expired
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue