Skip to content

Commit

Permalink
Merge pull request #95316 from sfowl/mask-token-in-toCurl
Browse files Browse the repository at this point in the history
Mask bearer token in logs when logLevel >= 9
  • Loading branch information
k8s-ci-robot committed Oct 7, 2020
2 parents 777e84e + f0f5225 commit e99df0e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions staging/src/k8s.io/client-go/transport/round_trippers.go
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 e99df0e

Please sign in to comment.