1
0
mirror of https://github.com/mayflower/docker-ls.git synced 2025-11-26 12:03:12 +03:00
Files
docker-ls/lib/connector/http_client_factory.go
2016-02-26 13:46:27 +01:00

22 lines
316 B
Go

package connector
import (
"crypto/tls"
"net/http"
)
func createHttpClient(cfg Config) *http.Client {
var tlsConfig *tls.Config
if cfg.AllowInsecure() {
tlsConfig = &tls.Config{
InsecureSkipVerify: true,
}
}
return &http.Client{
Transport: &http.Transport{
TLSClientConfig: tlsConfig,
},
}
}