diff --git a/api/api.go b/api/api.go index 9d2c24f..636fd8e 100644 --- a/api/api.go +++ b/api/api.go @@ -76,7 +76,7 @@ func ipFromRequest(r *http.Request) string { } host, _, err := net.SplitHostPort(r.RemoteAddr) - if err != nil { + if err == nil { return host }