diff --git a/node/http-context/clone.go b/node/http-context/clone.go index 3bfe8232..9849779e 100644 --- a/node/http-context/clone.go +++ b/node/http-context/clone.go @@ -147,6 +147,8 @@ func (ctx *cloneContext) SendTo(scheme string, node eoscContext.INode, timeout t agent.setStatusCode(504) } else { agent.setStatusCode(ctx.response.Response.StatusCode()) + ctx.response.remoteIP = tcpAddr.IP.String() + ctx.response.remotePort = tcpAddr.Port agent.setRemoteIP(tcpAddr.IP.String()) agent.setRemotePort(tcpAddr.Port) } diff --git a/node/http-context/context.go b/node/http-context/context.go index c86256bc..f0fcf41b 100644 --- a/node/http-context/context.go +++ b/node/http-context/context.go @@ -153,6 +153,8 @@ func (ctx *HttpContext) SendTo(scheme string, node eoscContext.INode, timeout ti ctx.response.ResponseHeader.refresh() agent.setRemoteIP(tcpAddr.IP.String()) agent.setRemotePort(tcpAddr.Port) + ctx.response.remoteIP = tcpAddr.IP.String() + ctx.response.remotePort = tcpAddr.Port agent.setStatusCode(ctx.fastHttpRequestCtx.Response.StatusCode()) } agent.responseBody = string(ctx.response.Response.Body())