1
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2024-12-16 21:56:40 -05:00

caddyhttp: Replace sensitive headers with REDACTED (close #5669)

This commit is contained in:
Matthew Holt 2024-03-29 14:42:20 -06:00
parent 924010cd3d
commit 7b48ce0e7e
No known key found for this signature in database
GPG key ID: 2A349DD577D586A5

View file

@ -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))