Chore: disable url-test http redirect (#536)

This commit is contained in:
Mac_Zhou 2020-02-25 16:08:13 +08:00 committed by GitHub
parent 9eaca6e4ab
commit 0740d20ba0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -194,7 +194,12 @@ func (p *Proxy) URLTest(ctx context.Context, url string) (t uint16, err error) {
ExpectContinueTimeout: 1 * time.Second,
}
client := http.Client{Transport: transport}
client := http.Client{
Transport: transport,
CheckRedirect: func(req *http.Request, via []*http.Request) error {
return http.ErrUseLastResponse
},
}
resp, err := client.Do(req)
if err != nil {
return