Bypassing proxy for loopback/locahost

Posted on

QUESTION :

I am developing a web application where in I am running a webserver at localhost:3000 and my app is deployed on the same.

Access to this URL through a web browser works fine because there is an option in the browser to say that I want to bypass the proxy for localhost/127.0.0.1. If I don’t use this , the request when routed through the proxy is blocked by the campus firewall(I am a student).

When I programmatically try to make requests to localhost/127.0.0.1, the firewall like above kicks in and I am served an error message. The same happens when I use

$ curl http://localhost:3000

Could you let me know how I can configure my system such that bypassing the proxy for localhost/127.0.0.1 works on a system wide scale rather than being an application specific setting(my web browser as mentioned above).

ANSWER :

My module I was using to make this http request(https://github.com/intridea/oauth2) was picking up the proxy setting from the current shell environment. Setting the shell environment variables, http_proxy and HTTP_PROXY, to an empty string helped

Leave a Reply

Your email address will not be published. Required fields are marked *