Files
OpenList/bootstrap/client.go

18 lines
328 B
Go
Raw Normal View History

2020-12-24 01:39:45 +08:00
package bootstrap
import (
2021-04-09 10:38:57 +08:00
"crypto/tls"
2020-12-24 01:39:45 +08:00
"github.com/Xhofe/alist/conf"
2020-12-26 18:11:17 +08:00
log "github.com/sirupsen/logrus"
2020-12-24 01:39:45 +08:00
"net/http"
)
2021-02-04 10:02:34 +08:00
// init request client
2021-03-05 21:25:44 +08:00
func InitClient() {
2020-12-26 18:11:17 +08:00
log.Infof("初始化client...")
2021-04-09 10:38:57 +08:00
tr := &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
}
conf.Client = &http.Client{Transport: tr}
2021-03-05 21:25:44 +08:00
}