Skip to content

Commit

Permalink
Do not log 127.0.0.1 queries
Browse files Browse the repository at this point in the history
  • Loading branch information
chubin committed Jan 5, 2024
1 parent 1228c73 commit 575908a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/logging/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ func (rl *RequestLogger) Log(r *http.Request) error {
le.Proto = "https"
}

// Do not log 127.0.0.1 connections
if le.IP == "127.0.0.1" {
return nil
}

rl.m.Lock()
rl.buf[le]++
rl.m.Unlock()
Expand Down

0 comments on commit 575908a

Please sign in to comment.