Fixes nil pointer dereferencing for Consul TLS transport
This commit is contained in:
parent
382abbf28b
commit
fd01ead575
@ -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