@@ -127,7 +127,9 @@ func parseHTTPSettings(jsonData json.RawMessage, secureJSONData map[string]strin
127
127
128
128
// Basic auth
129
129
if v , exists := dat ["basicAuth" ]; exists {
130
- s .BasicAuthEnabled = v .(bool )
130
+ if basicAuth , ok := v .(bool ); ok {
131
+ s .BasicAuthEnabled = basicAuth
132
+ }
131
133
}
132
134
if s .BasicAuthEnabled {
133
135
if v , exists := dat ["basicAuthUser" ]; exists {
@@ -213,13 +215,19 @@ func parseHTTPSettings(jsonData json.RawMessage, secureJSONData map[string]strin
213
215
214
216
// TLS
215
217
if v , exists := dat ["tlsAuth" ]; exists {
216
- s .TLSClientAuth = v .(bool )
218
+ if tlsClientAuth , ok := v .(bool ); ok {
219
+ s .TLSClientAuth = tlsClientAuth
220
+ }
217
221
}
218
222
if v , exists := dat ["tlsAuthWithCACert" ]; exists {
219
- s .TLSAuthWithCACert = v .(bool )
223
+ if tslAuthCert , ok := v .(bool ); ok {
224
+ s .TLSAuthWithCACert = tslAuthCert
225
+ }
220
226
}
221
227
if v , exists := dat ["tlsSkipVerify" ]; exists {
222
- s .TLSSkipVerify = v .(bool )
228
+ if tlsSkipVerify , ok := v .(bool ); ok {
229
+ s .TLSSkipVerify = tlsSkipVerify
230
+ }
223
231
}
224
232
225
233
if s .TLSClientAuth || s .TLSAuthWithCACert {
@@ -239,7 +247,9 @@ func parseHTTPSettings(jsonData json.RawMessage, secureJSONData map[string]strin
239
247
240
248
// SigV4
241
249
if v , exists := dat ["sigV4Auth" ]; exists {
242
- s .SigV4Auth = v .(bool )
250
+ if sigV4Auth , ok := v .(bool ); ok {
251
+ s .SigV4Auth = sigV4Auth
252
+ }
243
253
}
244
254
245
255
if s .SigV4Auth {
0 commit comments