Skip to content

Commit

Permalink
caddyhttp: Replace sensitive headers with REDACTED (close #5669)
Browse files Browse the repository at this point in the history
  • Loading branch information
mholt committed Mar 29, 2024
1 parent 924010c commit 7b48ce0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/caddyhttp/marshalers.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func (h LoggableHTTPHeader) MarshalLogObject(enc zapcore.ObjectEncoder) error {
if !h.ShouldLogCredentials {
switch strings.ToLower(key) {
case "cookie", "set-cookie", "authorization", "proxy-authorization":
val = []string{}
val = []string{"REDACTED"} // see #5669. I still think ▒▒▒▒ would be cool.
}
}
enc.AddArray(key, LoggableStringArray(val))
Expand Down

0 comments on commit 7b48ce0

Please sign in to comment.