mirror of
https://github.com/chubin/wttr.in
synced 2025-01-25 18:24:59 +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"
|
le.Proto = "https"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Do not log 127.0.0.1 connections
|
||||||
|
if le.IP == "127.0.0.1" {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
rl.m.Lock()
|
rl.m.Lock()
|
||||||
rl.buf[le]++
|
rl.buf[le]++
|
||||||
rl.m.Unlock()
|
rl.m.Unlock()
|
||||||
|
|
Loading…
Reference in a new issue