mirror of
https://github.com/chubin/wttr.in
synced 2024-11-14 16:17:19 +00:00
Do not log 127.0.0.1 queries
This commit is contained in:
parent
1228c73a59
commit
575908ae51
1 changed files with 5 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue