From 122579b5163393f69829f2f456a1218c07cceeed Mon Sep 17 00:00:00 2001 From: luke miles Date: Thu, 25 Aug 2022 22:32:45 +0200 Subject: [PATCH] api: fix error checking bug in IP code (#55) --- api/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 }