Skip to content

Commit

Permalink
Merge pull request #95354 from sfowl/automated-cherry-pick-of-#95316-…
Browse files Browse the repository at this point in the history
…upstream-release-1.18

Automated cherry pick of #95316: Mask bearer token in logs when logLevel >= 9

Kubernetes-commit: 16bf87fc78f1e51bdb65a67b8981279f43786eba
  • Loading branch information
k8s-publishing-bot committed Dec 14, 2020
2 parents 3214b66 + 1b8383f commit 649866c
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 649866c

Please sign in to comment.