From 9f850571b584178ba8e9adadc6eb7dcbc1734d52 Mon Sep 17 00:00:00 2001 From: Jon Reginbald Ivarsson Date: Fri, 24 May 2024 06:41:40 +0000 Subject: [PATCH] Don't follow redirects (#586) --- runner/proxy.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/runner/proxy.go b/runner/proxy.go index 282f2f0a..85004563 100644 --- a/runner/proxy.go +++ b/runner/proxy.go @@ -33,7 +33,11 @@ func NewProxy(cfg *cfgProxy) *Proxy { server: &http.Server{ Addr: fmt.Sprintf(":%d", cfg.ProxyPort), }, - client: &http.Client{}, + client: &http.Client{ + CheckRedirect: func(req *http.Request, via []*http.Request) error { + return http.ErrUseLastResponse + }, + }, stream: NewProxyStream(), } return p