Skip to content

Commit

Permalink
Mask bearer token in logs when logLevel >= 9
Browse files Browse the repository at this point in the history
Kubernetes-commit: f0f52255412cbc6834bd225a59608ebb4a0d399b
  • Loading branch information
sfowl authored and k8s-publishing-bot committed Oct 6, 2020
1 parent 1c5be7d commit e8f871a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions transport/round_trippers.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ func (r *requestInfo) toCurl() string {
headers := ""
for key, values := range r.RequestHeaders {
for _, value := range values {
value = maskValue(key, value)
headers += fmt.Sprintf(` -H %q`, fmt.Sprintf("%s: %s", key, value))
}
}
Expand Down

0 comments on commit e8f871a

Please sign in to comment.