-
Notifications
You must be signed in to change notification settings - Fork 2
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
RemoteEvaluationClient does not work behind a proxy server #26
Comments
Hi @andrewtcobb thanks for submitting this issue. If we expose the client configuration, which settings would you add to the OkHttpClient to support the proxy? I dont think we will expose the actual builder, rather a wrapper around specific features. |
Hey @bgiori, Thanks for looking at this. Fortunately, the |
@andrewtcobb, many thanks for raising this issue. You can now configure a |
I just did a quick test and it appears to work exactly as intended. Thanks so much for adding this in! |
RemoteEvaluationClient
fails to fetch user variants when running behind a proxy server.The following error occurs:
The
RemoteEvaluationClient
appears to be usingOkHttpClient
under the hood, and unfortunatelyOkHttpClient
does not provide support for proxy settings via environment variables like many HTTP clients do.OkHttpClient
provides support for proxy settings, but only programmatically via theOkHttpClient
builder (see this issue for more details). As far as I know, the only way to provide proxy support would be to haveRemoteEvaluationClient
allow users to provide proxy settings as a part of the configuration object and pass those settings to OkHttp in order to allow the client to work behind a proxy. This is not necessary with other Amplitude SKDs I have used like the Node SDK, as their underlying HTTP clients appear to support proxy environment variables.Are there any other workarounds you can think of in the meantime?
The text was updated successfully, but these errors were encountered: