Skip to content

Commit a1a05a8

Browse files
authored
Merge pull request #33 from rchincha/logs
logs: sanitize logs
2 parents d995865 + 64b9482 commit a1a05a8

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

pkg/api/log.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ func Logger(log zerolog.Logger) mux.MiddlewareFunc {
7373
clientIP := r.RemoteAddr
7474
method := r.Method
7575
headers := r.Header
76+
delete(headers, "Authorization") // strip from logs
7677
statusCode := sw.status
7778
bodySize := sw.length
7879
if raw != "" {

0 commit comments

Comments
 (0)