diff --git a/fe/http.go b/fe/http.go index 0e0b8e8e5de0bbe547fa259747308b17b063aafa..734a400371b07cd2972ddc5da57c42355dc8cd26 100644 --- a/fe/http.go +++ b/fe/http.go @@ -135,7 +135,8 @@ type httpRequestContext struct { } func (r *httpRequestContext) RemoteAddr() net.IP { - return net.ParseIP(r.req.RemoteAddr) + host, _, _ := net.SplitHostPort(r.req.RemoteAddr) + return net.ParseIP(host) } // Return an active node, chosen according to the current load