You've already forked oauth2-proxy
mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2025-08-06 22:42:56 +02:00
Add DefaultUpstreamFlushInterval to replace magic time.Second value
This commit is contained in:
@ -3,7 +3,6 @@ package validation
|
||||
import (
|
||||
"fmt"
|
||||
"net/url"
|
||||
"time"
|
||||
|
||||
"github.com/oauth2-proxy/oauth2-proxy/v7/pkg/apis/options"
|
||||
)
|
||||
@ -70,7 +69,7 @@ func validateStaticUpstream(upstream options.Upstream) []string {
|
||||
if upstream.InsecureSkipTLSVerify {
|
||||
msgs = append(msgs, fmt.Sprintf("upstream %q has insecureSkipTLSVerify, but is a static upstream, this will have no effect.", upstream.ID))
|
||||
}
|
||||
if upstream.FlushInterval != nil && upstream.FlushInterval.Duration() != time.Second {
|
||||
if upstream.FlushInterval != nil && upstream.FlushInterval.Duration() != options.DefaultUpstreamFlushInterval {
|
||||
msgs = append(msgs, fmt.Sprintf("upstream %q has flushInterval, but is a static upstream, this will have no effect.", upstream.ID))
|
||||
}
|
||||
if upstream.PassHostHeader != nil {
|
||||
|
Reference in New Issue
Block a user