From 64dde16d2747d8ee9cc9bd9c0fbcb6bebd570875 Mon Sep 17 00:00:00 2001 From: gaoshiyao Date: Thu, 24 Oct 2019 20:22:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=B7=AF=E7=94=B1=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/handler/proxyhandler.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/handler/proxyhandler.go b/src/handler/proxyhandler.go index 896dd43..f49c2f1 100644 --- a/src/handler/proxyhandler.go +++ b/src/handler/proxyhandler.go @@ -42,6 +42,8 @@ func getProxyURL(req *http.Request) string { result = fmt.Sprintf("http://%s%s", config.ProxyHost, path) } else { result = fmt.Sprintf("http://%s%s?%s", config.ProxyHost, path, rawQuery) + } + if strings.Contains(result, "?") { if strings.HasSuffix(result, "/") { result = strings.TrimRight(result, "/") } -- 2.26.0