-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Add HTTP Proxy lookup function support #94
Conversation
…the option to specify
…roxy [AXAGENT-1682] Add Proxy Lookup Function To Config
@@ -99,6 +99,7 @@ func newClient(endpoint string, isProtobuf bool, config Config) *Client { | |||
if config.Name == "" { | |||
config.Name = "go" | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also set config.Proxy
to http.ProxyFromEnvironment
if it is nil
, to maintain backwards compatible behaviour? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, yes to maintain backwards compatibility. Lemme make this change. This would mean that it would be impossible to disable proxies, but 🤷 that doesn't seem to be a complaint
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated the default to http.ProxyFromEnvironment
and updated the docs a bit in. 5a720a3
Update the default value for `Proxy` configs so that they default to `http.ProxyFromEnvironment` instead of no proxy.
Default the proxy to maintain backwards compatibility
Hello @ax-esuedmeier and @C-Pro Cool, many thanks! |
Added a proxy lookup function to the centrifuge client to enable customizations of proxies vs relying on the default http.ProxyFromEnvironment functionality.