Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 12, 14:30 UTC
caddyhttp: Replace sensitive headers with REDACTED (close #5669)
Matthew Holt committed
Mar 29, 2024 at 14:42 UTC
7b48ce0e7e397e024eac9b542d00b103040ef6b6
1 file changed
+1
-1
modules/caddyhttp/marshalers.go
+1
-1
@@ -75,7 +75,7 @@ func (h LoggableHTTPHeader) MarshalLogObject(enc zapcore.ObjectEncoder) error {
75
if !h.ShouldLogCredentials {
76
switch strings.ToLower(key) {
77
case "cookie", "set-cookie", "authorization", "proxy-authorization":
78
- val = []string{}
78
+ val = []string{"REDACTED"} // see #5669. I still think ▒▒▒▒ would be cool.
79
}
80
}
81
enc.AddArray(key, LoggableStringArray(val))