Merge pull request #196 from sarbash/fix-tls-consul-registry
Fixes nil pointer dereferencing for Consul TLS transport
This commit is contained in:
commit
87c39542b0
@ -81,6 +81,9 @@ func newConsulRegistry(opts ...Option) Registry {
|
||||
if options.Secure || options.TLSConfig != nil {
|
||||
config.Scheme = "https"
|
||||
// We're going to support InsecureSkipVerify
|
||||
if config.HttpClient == nil {
|
||||
config.HttpClient = new(http.Client)
|
||||
}
|
||||
config.HttpClient.Transport = newTransport(options.TLSConfig)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user