mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2026-10-03 05:01:22 +02:00
Introduce Duration so that marshalling works for duration strings
This commit is contained in:
@@ -70,7 +70,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 != time.Second {
|
||||
if upstream.FlushInterval != nil && upstream.FlushInterval.Duration() != time.Second {
|
||||
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 {
|
||||
|
||||
@@ -15,7 +15,7 @@ var _ = Describe("Upstreams", func() {
|
||||
errStrings []string
|
||||
}
|
||||
|
||||
flushInterval := 5 * time.Second
|
||||
flushInterval := options.Duration(5 * time.Second)
|
||||
staticCode200 := 200
|
||||
truth := true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user