1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2025-06-15 00:15:00 +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

@ -17,6 +17,7 @@ var _ = Describe("Upstreams", func() {
flushInterval := 5 * time.Second
staticCode200 := 200
truth := true
validHTTPUpstream := options.Upstream{
ID: "validHTTPUpstream",
@ -24,11 +25,9 @@ var _ = Describe("Upstreams", func() {
URI: "http://localhost:8080",
}
validStaticUpstream := options.Upstream{
ID: "validStaticUpstream",
Path: "/validStaticUpstream",
Static: true,
PassHostHeader: true, // This would normally be defaulted
ProxyWebSockets: true, // this would normally be defaulted
ID: "validStaticUpstream",
Path: "/validStaticUpstream",
Static: true,
}
validFileUpstream := options.Upstream{
ID: "validFileUpstream",
@ -134,8 +133,8 @@ var _ = Describe("Upstreams", func() {
URI: "ftp://foo",
Static: true,
FlushInterval: &flushInterval,
PassHostHeader: false,
ProxyWebSockets: false,
PassHostHeader: &truth,
ProxyWebSockets: &truth,
InsecureSkipTLSVerify: true,
},
},