From 89e4f8c8963baa7d2fd86216c399f1d6ed9099cc Mon Sep 17 00:00:00 2001 From: Liujian <824010343@qq.com> Date: Wed, 8 Nov 2023 11:43:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=9B=AE=E6=A0=87IP=E3=80=81?= =?UTF-8?q?=E7=9B=AE=E6=A0=87=E7=AB=AF=E5=8F=A3=E8=8E=B7=E5=8F=96=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- node/http-context/clone.go | 2 ++ node/http-context/context.go | 2 ++ 2 files changed, 4 insertions(+) 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())