HTTP/2 support for connections to origin servers & DoH client
Closes #625.
This commit is contained in:
parent
8a07a900fd
commit
47f2cbeace
|
@ -284,6 +284,7 @@ func newHTTPTransport(service OriginService, cfg OriginRequestConfig, log *zerol
|
|||
TLSHandshakeTimeout: cfg.TLSTimeout.Duration,
|
||||
ExpectContinueTimeout: 1 * time.Second,
|
||||
TLSClientConfig: &tls.Config{RootCAs: originCertPool, InsecureSkipVerify: cfg.NoTLSVerify},
|
||||
ForceAttemptHTTP2: true,
|
||||
}
|
||||
if _, isHelloWorld := service.(*helloWorld); !isHelloWorld && cfg.OriginServerName != "" {
|
||||
httpTransport.TLSClientConfig.ServerName = cfg.OriginServerName
|
||||
|
|
|
@ -135,6 +135,7 @@ func configureClient(hostname string, maxUpstreamConnections int) *http.Client {
|
|||
MaxIdleConns: 1,
|
||||
MaxConnsPerHost: maxUpstreamConnections,
|
||||
Proxy: http.ProxyFromEnvironment,
|
||||
ForceAttemptHTTP2: true,
|
||||
}
|
||||
_ = http2.ConfigureTransport(transport)
|
||||
|
||||
|
|
Loading…
Reference in New Issue