From 7a6e278182512ee9c47a1c2b4be3f202e406386d Mon Sep 17 00:00:00 2001 From: William Stewart Date: Sat, 9 Nov 2019 11:50:23 +0100 Subject: [PATCH] Use HTTP{,S}_PROXY/http{,s}_proxy env vars Signed-off-by: William Stewart --- pkg/es/config/config.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/es/config/config.go b/pkg/es/config/config.go index ee0c5a842ef..c9d1a26ad95 100644 --- a/pkg/es/config/config.go +++ b/pkg/es/config/config.go @@ -300,7 +300,9 @@ func (c *Configuration) getConfigOptions(logger *zap.Logger) ([]elastic.ClientOp TLSClientConfig: ctlsConfig, } } else { - httpTransport := &http.Transport{} + httpTransport := &http.Transport{ + Proxy: http.ProxyFromEnvironment, + } if c.TLS.CaPath != "" { ctls := &TLSConfig{CaPath: c.TLS.CaPath} ca, err := ctls.loadCertificate()