From 0065d3889337a492bece4d5fe4825f7862a35f6a Mon Sep 17 00:00:00 2001 From: Mmx233 Date: Sun, 17 Sep 2023 23:23:38 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20NoDirect=20HttpClient=20=E6=B5=85?= =?UTF-8?q?=E6=8B=B7=E8=B4=9D=E9=80=BB=E8=BE=91=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/srun/api.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/srun/api.go b/pkg/srun/api.go index 0e90193..05afa4f 100644 --- a/pkg/srun/api.go +++ b/pkg/srun/api.go @@ -28,7 +28,8 @@ func (a *Api) Init(https bool, domain string, client *http.Client) { // 初始化 http client a.Client = client - a.NoDirect = &(*client) + copyClient := *client + a.NoDirect = ©Client a.NoDirect.CheckRedirect = func(_ *http.Request, _ []*http.Request) error { return http.ErrUseLastResponse }