Ver Fonte

fix(webhooks): only log the header name when a header does not match

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jamesread há 4 dias atrás
pai
commit
a056815936
1 ficheiros alterados com 3 adições e 3 exclusões
  1. 3 3
      service/internal/webhooks/matcher.go

+ 3 - 3
service/internal/webhooks/matcher.go

@@ -56,10 +56,10 @@ func (m *WebhookMatcher) matchHeaders() bool {
 	for key, expectedValue := range m.config.MatchHeaders {
 		actualValue := m.req.Header.Get(key)
 		if !m.compareValues(actualValue, expectedValue) {
+			// Header values can be credentials, such as a token or signature, so
+			// only the header name is logged.
 			m.log.WithFields(log.Fields{
-				"header":   key,
-				"expected": expectedValue,
-				"actual":   actualValue,
+				"header": key,
 			}).Debugf("Header mismatch")
 			return false
 		}