Commit c64af39d authored by ale's avatar ale

fix remote ip detection for load balancer

RemoteAddr again.
parent 0a8e1bce
...@@ -135,7 +135,8 @@ type httpRequestContext struct { ...@@ -135,7 +135,8 @@ type httpRequestContext struct {
} }
func (r *httpRequestContext) RemoteAddr() net.IP { 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 // Return an active node, chosen according to the current load
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment