fix: panic on nil pointer

pull/4360/head
Andy Hsu 2023-05-11 19:44:44 +08:00
parent f97f1d532e
commit 4b0c01158d
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ func NewRestyClient() *resty.Client {
SetHeader("user-agent", UserAgent).
SetRetryCount(3).
SetTimeout(DefaultTimeout)
if conf.Conf.TlsInsecureSkipVerify {
if conf.Conf != nil && conf.Conf.TlsInsecureSkipVerify {
client = client.SetTLSClientConfig(&tls.Config{InsecureSkipVerify: true})
}
return client