From 1b8383fc150c9b816b0072032cca75754c2734d0 Mon Sep 17 00:00:00 2001 From: Sam Fowler Date: Tue, 6 Oct 2020 11:10:38 +1000 Subject: [PATCH] Mask bearer token in logs when logLevel >= 9 Kubernetes-commit: f5bf592fc0d60fe2f135bcea30a61b7ee6d8f2b9 --- transport/round_trippers.go | 1 + 1 file changed, 1 insertion(+) diff --git a/transport/round_trippers.go b/transport/round_trippers.go index a272753ae2..abfb7ad6cb 100644 --- a/transport/round_trippers.go +++ b/transport/round_trippers.go @@ -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)) } }