Do not log 127.0.0.1 queries

This commit is contained in:
Igor Chubin 2024-01-05 22:00:57 +01:00
parent 1228c73a59
commit 575908ae51

View file

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