Skip to content

Commit

Permalink
fix: dont log cookies
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard87 committed Oct 24, 2024
1 parent 7d6f7bf commit 7a54334
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,12 @@ func logDebugHeaders(r *http.Request) {
if headers.Get("Authorization") != "" {
headers.Set("Authorization", "***removed***")
}
if headers.Get("Cookie") != "" {
headers.Set("Cookie", "***removed***")
}
if headers.Get("Cookie2") != "" {
headers.Set("Cookie2", "***removed***")
}

zerolog.Ctx(r.Context()).Trace().Interface("headers", headers).Msg("Request headers")
}

0 comments on commit 7a54334

Please sign in to comment.