-
Notifications
You must be signed in to change notification settings - Fork 52
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
Allow to configure rollbax to contact api server via proxy #105
Allow to configure rollbax to contact api server via proxy #105
Conversation
hackey supports a really simple way to specify an url to be used as proxy
ping @whatyouhide |
Hey @GermanDZ, thanks for the contribution! I like it but all the infrastructure for testing it seems like overkill considering that we're basically testing a hackney feature. I would either:
Thoughts? |
I cannot use Mox to mock My options right now:
|
1 is what I would really prefer to avoid. 2 is what I meant when I said we could use Mox. I personally would go with 3, but either 2 or 3 are okay for me. |
Working on |
Finally I went for Now only check the request are made to the URL configured as |
Thanks @GermanDZ 💟 |
Why?
Because some security hardened production environments require to contact the "outside" internet through a proxy and hackney (the erlang http client used by rollbax) doesn't read the usual env vars used to config a proxy.
How?
Adding an optional entry to
Rollbar.config
allowing the specification of an URL to be passed to hackney to force the use of a proxy.Caveats
proxy
option in case the value is nil, which simplify a lot passing & using the config.Kudos to @amuino for guiding me to this solution