简体   繁体   中英

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. When I try to make an HTTP request using request.js, the HTTP_PROXY setting is respected. However, when I try to access a server whose domain is set in the NO_PROXY variable, I get a 503 error. It seems that the NO_PROXY variable is ignored.

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)?

Yes, no_proxy is ignored in mikeal/request . See this issue: 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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