mirror of
https://github.com/boringproxy/boringproxy.git
synced 2025-02-25 18:55:29 -06:00
Don't follow redirects in client HTTP client
This commit is contained in:
parent
0bb64b23b3
commit
e4b6598274
@ -81,7 +81,12 @@ func NewClient(config *ClientConfig) (*Client, error) {
|
||||
|
||||
certConfig := certmagic.NewDefault()
|
||||
|
||||
httpClient := &http.Client{}
|
||||
httpClient := &http.Client{
|
||||
// Don't follow redirects
|
||||
CheckRedirect: func(req *http.Request, via []*http.Request) error {
|
||||
return http.ErrUseLastResponse
|
||||
},
|
||||
}
|
||||
tunnels := make(map[string]Tunnel)
|
||||
cancelFuncs := make(map[string]context.CancelFunc)
|
||||
cancelFuncsMutex := &sync.Mutex{}
|
||||
|
Loading…
Reference in New Issue
Block a user