Fix Micro Proxy nil Transport Bug (#1208)

This commit is contained in:
ben-toogood 2020-02-17 09:28:48 +00:00 committed by GitHub
parent 1e40c86dfe
commit aa9a0a8d23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -214,6 +214,13 @@ func TLSConfig(t *tls.Config) Option {
return func(o *Options) {
// set the internal tls
o.TLSConfig = t
// set the default transport if one is not
// already set. Required for Init call below.
if o.Transport == nil {
o.Transport = transport.DefaultTransport
}
// set the transport tls
o.Transport.Init(
transport.Secure(true),