summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/main.go b/main.go
index d7974a1..96f0a18 100644
--- a/main.go
+++ b/main.go
@@ -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)