mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-01 02:12:50 +02:00
httputil/reproxy: fix policy transport (#3322)
This commit is contained in:
parent
a2d2f34e24
commit
6b663ba53f
2 changed files with 9 additions and 0 deletions
|
@ -62,6 +62,7 @@ func NewPolicyHTTPTransport(options *Options, policy *Policy, disableHTTP2 bool)
|
|||
//
|
||||
if disableHTTP2 {
|
||||
transport.TLSNextProto = map[string]func(authority string, c *tls.Conn) http.RoundTripper{}
|
||||
transport.ForceAttemptHTTP2 = false
|
||||
}
|
||||
|
||||
var tlsClientConfig tls.Config
|
||||
|
@ -111,6 +112,7 @@ func NewPolicyHTTPTransport(options *Options, policy *Policy, disableHTTP2 bool)
|
|||
// We avoid setting a custom client config unless we have to as
|
||||
// if TLSClientConfig is nil, the default configuration is used.
|
||||
if isCustomClientConfig {
|
||||
transport.DialTLSContext = nil
|
||||
transport.TLSClientConfig = &tlsClientConfig
|
||||
}
|
||||
return c.Then(transport)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue