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
Adding interpretation of no_proxy #565
Conversation
as suggested by #434
can we please merge this soon? Spend hours to figure out why our integration tests were not running in CI environment and it turns out this is due to axios' lack of interpreting no_proxy. |
Guys, hello! Is there any movements? We need this feature 🔥. |
@mzabriskie @nickuraltsev @rubennorte Hi guys! We are waiting for this improvement 4 months. Otherwise we will be forced to refuse to use your package, although we really like it 😢 |
hey guys, I just couldn't wait anymore, so I republished this branch on npm under |
We are running into issues because of this. Please bring this in ASAP |
lib/adapters/http.js
Outdated
@@ -99,6 +116,9 @@ module.exports = function httpAdapter(config) { | |||
password: proxyUrlAuth[1] | |||
}; | |||
} | |||
if (isANoProxyHost(proxy.host)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should that be parsed.hostname
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
of course. I'll fix that, and check, why the tests don't fail.
Any reason why this PR has not been merged since last 8 months? I have spent over 2 weeks tracking down a proxy issue, which could have been solved in 2 minutes if this had been merged. @mzabriskie and other committers, could you please help by accepting this PR? Thanks in advance. |
@mzabriskie, any chance you will be able to accept this PR? My project is blocked because of this. Please just drop a quick response so that we can plan accordingly. Thanks in advance. |
Sorry for the unreasonable delay. This NO_PROXY implementation is a good starting point but doesn't implement some usual use cases (like wildcards). I've discovered the proxy-from-env package that handles that (getting the proxy URL for a specific URL using the configuration in the environment), so you may want to use it instead. WDYT? |
lib/adapters/http.js
Outdated
@@ -224,3 +244,6 @@ module.exports = function httpAdapter(config) { | |||
} | |||
}); | |||
}; | |||
|
|||
|
|||
module.exports._isANoProxyHost = isANoProxyHost; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't export functions just for testing. This can be tested throught the behaviour of the request.
@rubennorte, proxy-from-env looks good but if we use that, it will interfere with Axios. Since Axios already supports |
I was suggesting that you could use it because we're most likely to do it anywhere in a following PR, so it could save you some work in the implementation of the wildcards. This only works in Node.js so adding a new dependency here wouldn't be an issue. |
Ah, ok @rubennorte. So I assume that your message to use proxy-from-env was addressed to @inthemill - the submitter of the PR. |
@nareshbhatia yep, sorry. |
I just merged #691, which is related to this one. |
@rubennorte When I use proxy-from-env it would make sense to change the whole part where the proxy is read from env-variables. This will have a much deeper impact on existing code. Seeing that it is only covered by integration tests, i'm not very confident doing this. I could try, but i would need some help testing all edge cases. Do you want me to do that? |
@inthemill that'd be great. I can give you some support if you need help with anything. |
@rubennorte what about these changes? |
Any update about no_proxy? |
Yes please. @rubennorte let's merge this PR, it's old enough. |
@nickuraltsev @rubennorte Please, let's get this merged! We love axios and are looking to support axios connections for a Thrift client library, but we need no_proxy support to use it anywhere beyond dev environments. |
Any news about no_proxy? |
It's not a good idea to wait 1year before merging an important PR without good reasons... |
@nickuraltsev @rubennorte |
2760755
to
48a7902
Compare
This is so typical of the Node ecosystem, lol. Becoming dependent upon abandonware. |
seems like we should wait for next year lol |
Hey guys ! Please give a try to https://github.com/axios/axios/tree/v0.19.0-beta.1 |
As suggested by #434 the interpretation of no_proxy is implemented here.
I would be happy if axios supports no_proxy, as i would be able to use it in my company.