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: f5bf592fc0d60fe2f135bcea30a61b7ee6d8f2b9
  • Loading branch information
sfowl authored and k8s-publishing-bot committed Oct 6, 2020
1 parent 3214b66 commit 1b8383f
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 1b8383f

Please # to comment.