Skip to content
This repository has been archived by the owner on Jan 12, 2021. It is now read-only.

feat: Add support for custom node http agent #53

Merged
merged 1 commit into from
Mar 31, 2020

Conversation

belemaire
Copy link
Contributor

We have a complex enterprise CI infrastructure in which we have to go through a proxy to tunnel requests to external servers.

One way to make http(s) requests go through a proxy in Node.js is to setup a custom http agent and pass it in http.request options.

This PR updates some functions to propagate the options that were set by the client. Ultimately, the request call will set the agent in the http.request options if it is set in client provided options.

Please note that this agent option is only exposed through programmatic usage of the package (that's our usage of it). It is not surfaced as a new CLI option (would be complex to). That being said, as a follow up of this PR, one could update the CLI to expose a new http-proxy option, for user to pass a proxy url, and internally could make use of tunnel -or other lib-, to create an agent from this url and pass it to the upload options so that it gets set in the http request.

@xljones xljones added backlog We hope to fix this feature/bug in the future feature request Request for a new feature labels Feb 19, 2020
@xljones
Copy link

xljones commented Feb 19, 2020

Hey @belemaire, thanks for the PR. We'll need to do some work on this to review the changes, and see what other updates we'll need to make if we integrate this. We won't be able to schedule for a while due to some of our other priorities.

I've raised this on our backlog to take a look at when time permits. For now you could fork the repository to start using your fix. Thanks again --Xander

@bugsnagbot bugsnagbot added scheduled Work is starting on this feature/bug and removed backlog We hope to fix this feature/bug in the future labels Mar 2, 2020
@bengourley bengourley mentioned this pull request Mar 31, 2020
@bengourley bengourley merged commit 02b843a into bugsnag:master Mar 31, 2020
@abigailbramble
Copy link

Released in v1.3.0

@abigailbramble abigailbramble added released This feature/bug fix has been released and removed scheduled Work is starting on this feature/bug labels Apr 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature request Request for a new feature released This feature/bug fix has been released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants