Skip to content

Commit

Permalink
chore(client): clarify redact related comment
Browse files Browse the repository at this point in the history
  • Loading branch information
kangasta authored Oct 11, 2024
1 parent 0442f0d commit ccf5f8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion upcloud/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ func (c *Client) logRequest(r *http.Request, body []byte) {
headers := r.Header.Clone()
if _, ok := headers[authorization]; ok {
auth := strings.Split(headers.Get(authorization), " ")
// Redact the token part of the Authorization header or the whole value if value has no space found.
// Redact the token part of the Authorization header or the whole value if there is no space to separate scheme from parameters.
if len(auth) > 1 {
headers.Set(authorization, fmt.Sprintf("%s [REDACTED]", auth[0]))
} else {
Expand Down

0 comments on commit ccf5f8a

Please sign in to comment.