Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENHANCEMENT] Update http client to use http.ProxyFromEnvironment #211

Open
johnlafata opened this issue Nov 11, 2019 · 0 comments
Open

Comments

@johnlafata
Copy link

Is it possible that the splunk-firehose-nozzle http client at:

https://github.com/cloudfoundry-community/splunk-firehose-nozzle/blob/031570d542440562bbe23e3444668e25e5b1a198/eventwriter/splunk.go#L34 [github.com]

could be modified to use the http.ProxyFromEnvironment reference, as shown here in another golang library used to communicate to Pivotal Network:

https://github.com/pivotal-cf/go-pivnet/issues/8 [github.com]

Basically, we are asking if this Snippet:

func NewSplunk(config *SplunkConfig) Writer {
		httpClient := cfhttp.NewClient()
		tr := &http.Transport{
			TLSClientConfig: &tls.Config{InsecureSkipVerify: config.SkipSSL},
		}
		httpClient.Transport = tr
	

		return &splunkClient{
			httpClient: httpClient,
			config:     config,
		}
	}

can be modified to use the http.ProxyFromEnvironment, similar to the following?

func NewSplunk(config *SplunkConfig) Writer {
		httpClient := cfhttp.NewClient()
		tr := &http.Transport{
			TLSClientConfig: &tls.Config{InsecureSkipVerify: config.SkipSSL},
			Proxy: http.ProxyFromEnvironment,
		}
		httpClient.Transport = tr
	

		return &splunkClient{
			httpClient: httpClient,
			config:     config,
		}
	}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants