mirror of https://github.com/Xhofe/alist
fix: panic on nil pointer
parent
f97f1d532e
commit
4b0c01158d
|
@ -29,7 +29,7 @@ func NewRestyClient() *resty.Client {
|
||||||
SetHeader("user-agent", UserAgent).
|
SetHeader("user-agent", UserAgent).
|
||||||
SetRetryCount(3).
|
SetRetryCount(3).
|
||||||
SetTimeout(DefaultTimeout)
|
SetTimeout(DefaultTimeout)
|
||||||
if conf.Conf.TlsInsecureSkipVerify {
|
if conf.Conf != nil && conf.Conf.TlsInsecureSkipVerify {
|
||||||
client = client.SetTLSClientConfig(&tls.Config{InsecureSkipVerify: true})
|
client = client.SetTLSClientConfig(&tls.Config{InsecureSkipVerify: true})
|
||||||
}
|
}
|
||||||
return client
|
return client
|
||||||
|
|
Loading…
Reference in New Issue