tomas / needle

Nimble, streamable HTTP client for Node.js. With proxy, iconv, cookie, deflate & multipart support.
https://www.npmjs.com/package/needle
MIT License
1.63k stars 236 forks source link

feat: add option to disable use_proxy_from_env_var #427

Closed neonnoon closed 11 months ago

neonnoon commented 1 year ago

What

This introduces an option to disable the functionality introduced in https://github.com/tomas/needle/pull/382 and addresses https://github.com/tomas/needle/issues/406. It keeps the default behaviour, but allows opting out of needle picking up proxy configuration from environment variables.

Why

Automatic use of environment variables for proxy configuration causes issues if the http agent should be extended with specific proxy features, for example, when using https://github.com/gajus/global-agent.

neonnoon commented 11 months ago

@tomas , do you mind having a look at this PR?

tomas commented 11 months ago

Thanks @neonnoon!

neonnoon commented 11 months ago

Thanks for merging @tomas ! Any chance you can trigger a new release with this fix?

tomas commented 11 months ago

I already did! v3.3.0 is up since friday!