diff options
| -rw-r--r-- | main.go | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -37,7 +37,12 @@ func main() { } luaArgv := flag.Args() mustExist(luaArgv[0]) - httpClient := &http.Client{} + httpClient := &http.Client{ + // do not follow redirects + CheckRedirect: func(req *http.Request, via []*http.Request) error { + return http.ErrUseLastResponse + }, + } // queue for http messages for workers to handle msgs := make(chan *HTTPRequest, 4096) |
