Bypassing proxy for loopback/locahost

Posted on


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/ 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/, 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/ works on a system wide scale rather than being an application specific setting(my web browser as mentioned above).


My module I was using to make this http request( 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 *