Skip to content

Commit

Permalink
add http proxy option
Browse files Browse the repository at this point in the history
  • Loading branch information
윤민식 committed Jun 13, 2016
1 parent f5b9b28 commit cd67d94
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,14 @@ module.exports = {
return done();
}

request( host + name )
var options = {
url: host + name,
};
if (process.env.http_proxy != null) {
options.proxy = process.env.http_proxy;
};

request( options )
.on( 'error', function( err ) {
logger.error( 'Error while downloading', name );
logger.error( err );
Expand Down

0 comments on commit cd67d94

Please sign in to comment.