From 510ffacf1fde810b7c0250a02c6a64f74f062491 Mon Sep 17 00:00:00 2001 From: Bob Aman Date: Mon, 22 Apr 2019 18:12:54 -0700 Subject: [PATCH] Extend timeout and flush frequently --- internal/proxy/oauthproxy.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/proxy/oauthproxy.go b/internal/proxy/oauthproxy.go index ecf1b84f..1012a50d 100755 --- a/internal/proxy/oauthproxy.go +++ b/internal/proxy/oauthproxy.go @@ -185,8 +185,8 @@ func (t *upstreamTransport) getTransport() *http.Transport { t.transport = &http.Transport{ Proxy: http.ProxyFromEnvironment, DialContext: (&net.Dialer{ - Timeout: 30 * time.Second, - KeepAlive: 30 * time.Second, + Timeout: 300 * time.Second, + KeepAlive: 300 * time.Second, DualStack: true, }).DialContext, MaxIdleConns: 100, @@ -216,6 +216,7 @@ func NewReverseProxy(to *url.URL, config *UpstreamConfig) *httputil.ReverseProxy req.Host = to.Host } } + proxy.FlushInterval = 100 * time.Millisecond return proxy }