Skip to content
Snippets Groups Projects
Commit d1e6a380 authored by ale's avatar ale
Browse files

Set default timeouts on the proxy http.Transport

parent 28fcb558
Branches
No related tags found
No related merge requests found
......@@ -73,6 +73,12 @@ func (b *Backend) newHandler(ssow *httpsso.SSOWrapper) (http.Handler, error) {
var d net.Dialer
return d.DialContext(ctx, network, b.Upstream[rnd.Intn(len(b.Upstream))])
},
// Parameters match those of net/http.DefaultTransport.
MaxIdleConns: 100,
IdleConnTimeout: 90 * time.Second,
TLSHandshakeTimeout: 10 * time.Second,
ExpectContinueTimeout: 1 * time.Second,
}
h := ssow.Wrap(proxy, b.Host+"/", b.AllowedGroups)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment