NoRedirectPolicy disable redirect behaviour
()
| 28 | |
| 29 | // NoRedirectPolicy disable redirect behaviour |
| 30 | func NoRedirectPolicy() RedirectPolicy { |
| 31 | return func(req *http.Request, via []*http.Request) error { |
| 32 | return http.ErrUseLastResponse |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | // SameDomainRedirectPolicy allows redirect only if the redirected domain |
| 37 | // is the same as original domain, e.g. redirect to "www.imroc.cc" from |
no outgoing calls
searching dependent graphs…