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 }