Skip to content

Commit

Permalink
dont log auth request header (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-thacker-nullify authored Apr 17, 2024
1 parent ac8919b commit 1f5afd9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/logger/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package logger
import (
"context"
"net/http"
"strings"
"time"

"github.com/nullify-platform/logger/pkg/logger/tracer"
Expand Down Expand Up @@ -42,6 +43,10 @@ func (t *LoggingTransport) RoundTrip(req *http.Request) (*http.Response, error)

reqHeaders := []string{}
for header, values := range req.Header {
if strings.ToLower(header) == "authorization" {
continue
}

for _, value := range values {
reqHeaders = append(reqHeaders, header+": "+value)
}
Expand Down

0 comments on commit 1f5afd9

Please sign in to comment.