mirror of
https://github.com/davidallendj/magellan.git
synced 2025-12-20 11:37:01 -07:00
Fixed TLS errors in collect
This commit is contained in:
parent
0403b2bcbc
commit
a75530e96b
2 changed files with 9 additions and 7 deletions
|
|
@ -529,7 +529,7 @@ func makeGofishConfig(q *QueryParams) (gofish.ClientConfig, error) {
|
|||
Endpoint: url,
|
||||
Username: q.User,
|
||||
Password: q.Pass,
|
||||
Insecure: q.CaCertPath == "",
|
||||
Insecure: true,
|
||||
TLSHandshakeTimeout: q.Timeout,
|
||||
HTTPClient: client,
|
||||
// MaxConcurrentRequests: int64(q.Threads), // NOTE: this was added in latest version of gofish
|
||||
|
|
|
|||
|
|
@ -45,7 +45,9 @@ func MakeRequest(client *http.Client, url string, httpMethod string, body []byte
|
|||
// use defaults if no client provided
|
||||
if client == nil {
|
||||
client = http.DefaultClient
|
||||
http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: true}
|
||||
client.Transport = &http.Transport{
|
||||
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
|
||||
}
|
||||
}
|
||||
req, err := http.NewRequest(httpMethod, url, bytes.NewBuffer(body))
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue