I recently created a node.js app that reaches out to social media sites and caches our public feeds. I'm using some existing npm modules to facilitate accessing the social media api's. It works like a charm in my dev environment but on our production environment requests are timing out because they need to go through a proxy.
Without having to modify the npm modules how can I make the outbound requests go through a proxy?
Use the http.globalAgent property. This will let you intercept all requests running in your process. You can then modify those requests to be properly formatted for the proxy server.
http://nodejs.org/api/http.html#http_http_globalagent
Another option is to create a proxy exception for that application.