Skip to content

Commit

Permalink
Support proxy env vars for Elasticsearch HTTP client (#1910)
Browse files Browse the repository at this point in the history
Signed-off-by: William Stewart <[email protected]>
  • Loading branch information
zoidyzoidzoid authored and yurishkuro committed Nov 10, 2019
1 parent c8f52a9 commit 0313d0d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/es/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 0313d0d

Please sign in to comment.