octonode icon indicating copy to clipboard operation
octonode copied to clipboard

HTTP_PROXY appears not to be followed

Open darkwing opened this issue 10 years ago • 2 comments
trafficstars

For local testing, I'm hoping to proxy GitHub API calls to a local host (http://host:8000/). I do the following command to start my application:

export HTTP_PROXY='http://host:8000/' && node app

Yet octonode still hits https://api.github.com/repos/........ to fetch data. According to the documentation, shouldn't http://host:8000/..... be used?

darkwing avatar Jul 09 '15 19:07 darkwing

Can you try setting HTTPS_PROXY?

pksunkara avatar Jul 11 '15 04:07 pksunkara

No dice; a reduced example:

> export HTTPS_PROXY='http://host:8000/'
> node
var octonode = require('octonode');
var client = octonode.client();
var j = client.get('/users/darkwing', function(){});

// Request goes to:  https://api.github.com/users/darkwing

darkwing avatar Jul 13 '15 16:07 darkwing