Skip to content

Commit

Permalink
don't follow redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
ldemailly committed Jan 28, 2023
1 parent beb00ad commit 8fa81ae
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mc/mc.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ func MultiCurl(method, urlString, resolveType string) int {
tr.DisableKeepAlives = true
cli := http.Client{
Transport: tr,
CheckRedirect: func(req *http.Request, via []*http.Request) error {
return http.ErrUseLastResponse
},
}
for i, addr := range addrs {
log.Infof("%d: Fetching from %s", i, addr)
Expand Down

0 comments on commit 8fa81ae

Please sign in to comment.