Change logging

This commit is contained in:
Maximilian Friedersdorff 2025-09-30 10:17:05 +01:00
parent c098abf14f
commit c2e6612647

View file

@ -49,13 +49,6 @@ func (s *SessionStore) Logout(w http.ResponseWriter, r *http.Request) {
func (s *SessionStore) AsMiddleware(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
sessionCookie, err := r.Cookie("id")
for name, values := range r.Header {
for _, value := range values {
fmt.Println(name, value)
}
}
// No session yet
if err != nil {
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 expired