I am building a nodejs+express application which makes a HTTP GET call using the node-fetch library to retrieve a response from a service. The problem is the host of that service which I am calling does not work well with proxy, it sometime returns a response and sometimes it fails, which is working as designed. So I was asked to add the hostname of that API call to the NO_PROXY environment variable to get it to work. I am running the application in a docker container so I have added it as an ENV variable as well as added it on the node app startup script as
NODE_ENV=xyz.abc.com node app.js
However I am still running into the same issue and looks like the node+express application is not considering the NO_PROXY variable is using the proxy to make the REST call. Is there any other way to configure it so that the the environment variable is picked up.