@@ -54,12 +54,12 @@ func validateUpstream(upstream options.Upstream, ids, paths map[string]struct{})
54func validateStaticUpstream(upstream options.Upstream) []string {
54func validateStaticUpstream(upstream options.Upstream) []string {
55 msgs := []string{}
55 msgs := []string{}
57− if !*upstream.Static && upstream.StaticCode != nil {
57+ if !(*upstream.Static) && upstream.StaticCode != nil {
58 msgs = append(msgs, fmt.Sprintf("upstream %q has staticCode (%d), but is not a static upstream, set 'static' for a static response", upstream.ID, *upstream.StaticCode))
58 msgs = append(msgs, fmt.Sprintf("upstream %q has staticCode (%d), but is not a static upstream, set 'static' for a static response", upstream.ID, *upstream.StaticCode))
61 // Checks after this only make sense when the upstream is static
61 // Checks after this only make sense when the upstream is static
62− if !*upstream.Static {
62+ if !(*upstream.Static) {
63 return msgs
63 return msgs
@@ -72,10 +72,10 @@ func validateStaticUpstream(upstream options.Upstream) []string {
72 if upstream.FlushInterval != nil && *upstream.FlushInterval != options.DefaultUpstreamFlushInterval {
72 if upstream.FlushInterval != nil && *upstream.FlushInterval != options.DefaultUpstreamFlushInterval {
73 msgs = append(msgs, fmt.Sprintf("upstream %q has flushInterval, but is a static upstream, this will have no effect.", upstream.ID))
73 msgs = append(msgs, fmt.Sprintf("upstream %q has flushInterval, but is a static upstream, this will have no effect.", upstream.ID))
75− if upstream.PassHostHeader != nil {
75+ if *upstream.PassHostHeader {
76 msgs = append(msgs, fmt.Sprintf("upstream %q has passHostHeader, but is a static upstream, this will have no effect.", upstream.ID))
76 msgs = append(msgs, fmt.Sprintf("upstream %q has passHostHeader, but is a static upstream, this will have no effect.", upstream.ID))
78− if upstream.ProxyWebSockets != nil {
78+ if *upstream.ProxyWebSockets {
79 msgs = append(msgs, fmt.Sprintf("upstream %q has proxyWebSockets, but is a static upstream, this will have no effect.", upstream.ID))
79 msgs = append(msgs, fmt.Sprintf("upstream %q has proxyWebSockets, but is a static upstream, this will have no effect.", upstream.ID))
@@ -85,7 +85,7 @@ func validateStaticUpstream(upstream options.Upstream) []string {
85func validateUpstreamURI(upstream options.Upstream) []string {
85func validateUpstreamURI(upstream options.Upstream) []string {
86 msgs := []string{}
86 msgs := []string{}
88− if !*upstream.Static && upstream.URI == "" {
88+ if !(*upstream.Static) && upstream.URI == "" {
89 msgs = append(msgs, fmt.Sprintf("upstream %q has empty uri: uris are required for all non-static upstreams", upstream.ID))
89 msgs = append(msgs, fmt.Sprintf("upstream %q has empty uri: uris are required for all non-static upstreams", upstream.ID))
90 return msgs
90 return msgs