Skip to content

Commit

Permalink
Merge pull request #230 from signalfx/fix_loggable_header_string
Browse files Browse the repository at this point in the history
sfxclient/httpsink: use hex encoded string representation for loggabl…
  • Loading branch information
jgheewala authored Nov 19, 2021
2 parents b2adab8 + 5e3a0d3 commit baa19c9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sfxclient/httpsink.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"compress/gzip"
"context"
"crypto/sha1"
"encoding/hex"
"encoding/json"
"fmt"
"io"
Expand Down Expand Up @@ -160,7 +161,7 @@ func getShaValue(values []string) string {
for _, v := range values {
h.Write([]byte(v))
}
return string(h.Sum(nil))
return hex.EncodeToString(h.Sum(nil))
}

// loggableHeaders returns headers that are only allowed to be logged. For instance "X-Sf-Token" should not be logged so
Expand Down

0 comments on commit baa19c9

Please sign in to comment.