Skip to content

Commit

Permalink
don't log X-Forwarded-For, X-Forwarded-Host, Cache-Control
Browse files Browse the repository at this point in the history
  • Loading branch information
kjk committed Oct 22, 2023
1 parent c2196c6 commit 368614b
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions httplogger/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,24 +73,27 @@ func (l *Logger) Close() error {
// some headers and not worth logging
var (
hdrsToNotLog = []string{
"Accept-Language",
"Cache-Control",
"Cf-Ray",
"CF-Visitor",
"Cdn-Loop",
"Cookie",
"Connection",
"Dnt",
"If-Modified-Since",
"Sec-Fetch-Dest",
"Sec-Ch-Ua-Mobile",
// "Sec-Ch-Ua",
"Sec-Fetch-Dest",
"Sec-Ch-Ua-Platform",
"Dnt",
"Upgrade-Insecure-Requests",
"Sec-Fetch-Site",
"Sec-Fetch-Mode",
"Sec-Fetch-User",
"If-Modified-Since",
"Accept-Language",
"Cf-Ray",
"CF-Visitor",
"Upgrade-Insecure-Requests",
"X-Request-Start",
"Cdn-Loop",
"X-Forwarded-For",
"X-Forwarded-Proto",
"Cookie",
"X-Forwarded-Host",
}
hdrsToNotLogMap map[string]bool
)
Expand Down

0 comments on commit 368614b

Please sign in to comment.