chore: update linter

This commit is contained in:
Ludovic Fernandez 2025-04-11 10:56:05 +02:00 committed by GitHub
parent 8cf22207b5
commit f794f8a294
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 344 additions and 321 deletions

View file

@ -364,9 +364,10 @@ func (h *Handler) logTheRoundTrip(logDataTable *LogData) {
func (h *Handler) redactHeaders(headers http.Header, fields logrus.Fields, prefix string) {
for k := range headers {
v := h.config.Fields.KeepHeader(k)
if v == types.AccessLogKeep {
switch v {
case types.AccessLogKeep:
fields[prefix+k] = strings.Join(headers.Values(k), ",")
} else if v == types.AccessLogRedact {
case types.AccessLogRedact:
fields[prefix+k] = "REDACTED"
}
}