@@ -127,7 +127,9 @@ func parseHTTPSettings(jsonData json.RawMessage, secureJSONData map[string]strin
127127
128128 // Basic auth
129129 if v , exists := dat ["basicAuth" ]; exists {
130- s .BasicAuthEnabled = v .(bool )
130+ if basicAuth , ok := v .(bool ); ok {
131+ s .BasicAuthEnabled = basicAuth
132+ }
131133 }
132134 if s .BasicAuthEnabled {
133135 if v , exists := dat ["basicAuthUser" ]; exists {
@@ -213,13 +215,19 @@ func parseHTTPSettings(jsonData json.RawMessage, secureJSONData map[string]strin
213215
214216 // TLS
215217 if v , exists := dat ["tlsAuth" ]; exists {
216- s .TLSClientAuth = v .(bool )
218+ if tlsClientAuth , ok := v .(bool ); ok {
219+ s .TLSClientAuth = tlsClientAuth
220+ }
217221 }
218222 if v , exists := dat ["tlsAuthWithCACert" ]; exists {
219- s .TLSAuthWithCACert = v .(bool )
223+ if tslAuthCert , ok := v .(bool ); ok {
224+ s .TLSAuthWithCACert = tslAuthCert
225+ }
220226 }
221227 if v , exists := dat ["tlsSkipVerify" ]; exists {
222- s .TLSSkipVerify = v .(bool )
228+ if tlsSkipVerify , ok := v .(bool ); ok {
229+ s .TLSSkipVerify = tlsSkipVerify
230+ }
223231 }
224232
225233 if s .TLSClientAuth || s .TLSAuthWithCACert {
@@ -239,7 +247,9 @@ func parseHTTPSettings(jsonData json.RawMessage, secureJSONData map[string]strin
239247
240248 // SigV4
241249 if v , exists := dat ["sigV4Auth" ]; exists {
242- s .SigV4Auth = v .(bool )
250+ if sigV4Auth , ok := v .(bool ); ok {
251+ s .SigV4Auth = sigV4Auth
252+ }
243253 }
244254
245255 if s .SigV4Auth {
0 commit comments