简体   繁体   English

node.js / request.js忽略NO_PROXY环境变量

[英]node.js/request.js ignores NO_PROXY environment variable

I set the HTTP_PROXY, HTTPS_PROXY and NO_PROXY environment variables (both in upper and lower case) on my Mac. 我在Mac上设置了HTTP_PROXY,HTTPS_PROXY和NO_PROXY环境变量(大写和小写)。 When I try to make an HTTP request using request.js, the HTTP_PROXY setting is respected. 当我尝试使用request.js发出HTTP请求时,会遵循HTTP_PROXY设置。 However, when I try to access a server whose domain is set in the NO_PROXY variable, I get a 503 error. 但是,当我尝试访问其域在NO_PROXY变量中设置的服务器时,出现503错误。 It seems that the NO_PROXY variable is ignored. 似乎NO_PROXY变量被忽略了。

Does anyone know how I can tell Node.js/request.js to ignore certain domains when going through the proxy (without implementing it on my own)? 有谁知道我在告诉代理时如何告诉Node.js / request.js忽略某些域(而不是自己实现)?

Yes, no_proxy is ignored in mikeal/request . 是的,在mikeal/request忽略了no_proxy See this issue: https://github.com/mikeal/request/issues/620 看到这个问题: https : //github.com/mikeal/request/issues/620

It looks like he's willing to accept a fix, but nobody has written it yet. 看起来他愿意接受修复程序,但是还没有人编写。 If you offer up a solution, many people would appreciate it. 如果您提供解决方案,许多人将不胜感激。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM