1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2025-12-07 23:13:07 +02:00

Use bool pointers for upstream options that default to true

This commit is contained in:
Joel Speed
2020-07-19 14:00:52 +01:00
parent 6b27069812
commit d43b372ca9
7 changed files with 41 additions and 38 deletions

View File

@@ -77,8 +77,8 @@ func (l *LegacyUpstreams) convert() (Upstreams, error) {
Path: u.Path,
URI: upstreamString,
InsecureSkipTLSVerify: l.SSLUpstreamInsecureSkipVerify,
PassHostHeader: l.PassHostHeader,
ProxyWebSockets: l.ProxyWebSockets,
PassHostHeader: &l.PassHostHeader,
ProxyWebSockets: &l.ProxyWebSockets,
FlushInterval: &l.FlushInterval,
}
@@ -104,8 +104,8 @@ func (l *LegacyUpstreams) convert() (Upstreams, error) {
// Force defaults compatible with static responses
upstream.URI = ""
upstream.InsecureSkipTLSVerify = false
upstream.PassHostHeader = true
upstream.ProxyWebSockets = false
upstream.PassHostHeader = nil
upstream.ProxyWebSockets = nil
flush := 1 * time.Second
upstream.FlushInterval = &flush
}