From bee4b10e8c1d6cd3dd6d039da32871865562404b Mon Sep 17 00:00:00 2001 From: Marcin Wolny Date: Thu, 14 Dec 2023 11:03:21 +0100 Subject: [PATCH] Option DisableKeepAlives is a workaround We no longer need this option and we don't use it. --- internal/proxy/config.go | 5 ++--- internal/proxy/reverseproxy.go | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/internal/proxy/config.go b/internal/proxy/config.go index 31f968d..f721e5b 100644 --- a/internal/proxy/config.go +++ b/internal/proxy/config.go @@ -17,9 +17,8 @@ type ProxyConfig struct { // nolint:revive } type TargetConnectionHTTP struct { - URL string `yaml:"url"` - Compression bool `yaml:"compression"` - DisableKeepAlives bool `yaml:"disableKeepAlives"` + URL string `yaml:"url"` + Compression bool `yaml:"compression"` } type TargetConfigConnection struct { diff --git a/internal/proxy/reverseproxy.go b/internal/proxy/reverseproxy.go index 4f362ea..52d4101 100644 --- a/internal/proxy/reverseproxy.go +++ b/internal/proxy/reverseproxy.go @@ -38,7 +38,6 @@ func NewReverseProxy(targetConfig TargetConfig, config Config) (*httputil.Revers Proxy: http.ProxyFromEnvironment, DialContext: conntrackDialer, ForceAttemptHTTP2: true, - DisableKeepAlives: targetConfig.Connection.HTTP.DisableKeepAlives, MaxIdleConns: 100, IdleConnTimeout: 30 * time.Second, TLSHandshakeTimeout: 10 * time.Second,