Closed emilbayes closed 1 year ago
Ah, overlooked this related PR: https://github.com/TooTallNate/node-proxy-agent/pull/39
This code in this repository has been moved to the proxy-agents
monorepo, so I am closing this pull request. If you feel that this issue still exists as of the latest release, feel free to open a new issue over there.
Hi!
Thank you for the excellent module. I was debugging why my proxy set using env vars (
HTTP_PROXY
and friends) was not being picked up, and I saw thatopts
was missing the.protocol
option. Tried reading through thenet
docs but couldn't find a definitive source on what the options actually are supposed to contain. It all fails on the dependency broking out if the protocol is not set: https://github.com/Rob--W/proxy-from-env/blob/e0d07a9350568b3a0c3bb28dafd3766206961a02/index.js#L29For now I added
if (!opts.protocol) opts.protocol = opts.secureEndpoint ? 'https' : 'http'
which is feels like a hack.Any advice? I'm happy to provide a PR but not entirely sure what's right here