Skip to content

Commit bbdf589

Browse files
Fixed follow redirects policy
1 parent 36a95dc commit bbdf589

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

gohpts.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,9 @@ func New(conf *Config) *app {
185185
Transport: &http.Transport{
186186
Dial: dialer.Dial,
187187
},
188+
CheckRedirect: func(req *http.Request, via []*http.Request) error {
189+
return http.ErrUseLastResponse
190+
},
188191
}
189192
hs := &http.Server{
190193
Addr: conf.AddrHTTP,

0 commit comments

Comments
 (0)