Add DefaultUpstreamFlushInterval to replace magic time.Second value

This commit is contained in:
Joel Speed
2020-11-19 10:39:21 +00:00
parent 8e582ac02a
commit aed43a54da
4 changed files with 11 additions and 6 deletions
+1 -2
View File
@@ -6,7 +6,6 @@ import (
"net/http/httputil"
"net/url"
"strings"
"time"
"github.com/mbland/hmacauth"
"github.com/oauth2-proxy/oauth2-proxy/v7/pkg/apis/options"
@@ -100,7 +99,7 @@ func newReverseProxy(target *url.URL, upstream options.Upstream, errorHandler Pr
if upstream.FlushInterval != nil {
proxy.FlushInterval = upstream.FlushInterval.Duration()
} else {
proxy.FlushInterval = 1 * time.Second
proxy.FlushInterval = options.DefaultUpstreamFlushInterval
}
// InsecureSkipVerify is a configurable option we allow