-
-
Notifications
You must be signed in to change notification settings - Fork 11k
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
HTTP proxy authentication #476
Comments
Would be happy to accept a PR for this. |
Hi guys,
|
Just submitted the PR, let me know how it looks like. |
Great, thanks @mawrkus! |
At what time in the lifetime of my nodejs script executing must process.env.http_proxy or process.env.https_proxy be set? My proxy settings don't appear to work. Also, I'm using v0.11.0 of axios, and I'm not sure how to tell what version this PR is a part of. |
According to the changelog, the fix was included in v0.15.3. Though it still wouldn't work in our environment and I couldn't figure out why in a reasonable time, so we kept using superagent instead. 🤷♂️ I've always seen environment variables being set before/when the application starts, I'm not sure if it's possible to set them afterwards (and it doesn't sound like a good idea anyway). |
Thanks a bunch @peruukki ! Weird yeah I’ve just been using request-native-promise instead 🤷♂️ I see why one should normally not set env vars after script starts but I wrote a CLI program that optionally let’s the user configure proxy settings for the rest of the lifetime of the script The root problem here tho was version of library I was using, setting env vars after script starts was just accidental red herring Thank u!! |
HTTP proxy support was added in #366, but the proxy configuration only takes into account the proxy host and port. We are running in an environment that requires authenticating to the proxy, and as far as I understood, axios doesn't support that. We are using the standard
http_proxy
andhttps_proxy
environment variables with the credentials in the URL, likehttp://proxy-user:proxy-password@proxy-host:proxy-port
, and passing that works as expected with e.g. superagent-proxy.So I'm requesting to have support for HTTP proxy authentication, preferably even taking the credentials automatically from HTTP proxy environment variables.
The text was updated successfully, but these errors were encountered: