From 21de83d31e03eaa3cb2727bb3bf96e638c1030c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Wed, 30 Mar 2022 17:31:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=8D=E5=90=91=E4=BB=A3=E7=90=86=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E5=A2=9E=E5=8A=A0URL=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/nodes/http_request_reverse_proxy.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/nodes/http_request_reverse_proxy.go b/internal/nodes/http_request_reverse_proxy.go index 378f963..c141db4 100644 --- a/internal/nodes/http_request_reverse_proxy.go +++ b/internal/nodes/http_request_reverse_proxy.go @@ -161,7 +161,7 @@ func (this *HTTPRequest) doReverseProxy() { // 获取请求客户端 client, err := SharedHTTPClientPool.Client(this, origin, originAddr, this.reverseProxy.ProxyProtocol, this.reverseProxy.FollowRedirects) if err != nil { - remotelogs.Error("HTTP_REQUEST_REVERSE_PROXY", err.Error()) + remotelogs.Error("HTTP_REQUEST_REVERSE_PROXY", this.URL()+": "+err.Error()) this.write50x(err, http.StatusBadGateway, true) return } @@ -195,7 +195,7 @@ func (this *HTTPRequest) doReverseProxy() { this.write50x(err, http.StatusBadGateway, true) } if httpErr.Err != io.EOF { - remotelogs.Warn("HTTP_REQUEST_REVERSE_PROXY", this.RawReq.URL.String()+"': "+err.Error()) + remotelogs.Warn("HTTP_REQUEST_REVERSE_PROXY", this.URL()+": "+err.Error()) } } else { // 是否为客户端方面的错误 @@ -234,7 +234,7 @@ func (this *HTTPRequest) doReverseProxy() { if this.doWAFResponse(resp) { err = resp.Body.Close() if err != nil { - remotelogs.Warn("HTTP_REQUEST_REVERSE_PROXY", err.Error()) + remotelogs.Warn("HTTP_REQUEST_REVERSE_PROXY", this.URL()+": "+err.Error()) } return } @@ -244,7 +244,7 @@ func (this *HTTPRequest) doReverseProxy() { if len(this.web.Pages) > 0 && this.doPage(resp.StatusCode) { err = resp.Body.Close() if err != nil { - remotelogs.Warn("HTTP_REQUEST_REVERSE_PROXY", err.Error()) + remotelogs.Warn("HTTP_REQUEST_REVERSE_PROXY", this.URL()+": "+err.Error()) } return } @@ -309,13 +309,13 @@ func (this *HTTPRequest) doReverseProxy() { var closeErr = resp.Body.Close() if closeErr != nil { if !this.canIgnore(closeErr) { - remotelogs.Warn("HTTP_REQUEST_REVERSE_PROXY", closeErr.Error()) + remotelogs.Warn("HTTP_REQUEST_REVERSE_PROXY", this.URL()+": "+closeErr.Error()) } } if err != nil && err != io.EOF { if !this.canIgnore(err) { - remotelogs.Warn("HTTP_REQUEST_REVERSE_PROXY", err.Error()) + remotelogs.Warn("HTTP_REQUEST_REVERSE_PROXY", this.URL()+": "+err.Error()) this.addError(err) } }