Skip to content

Commit

Permalink
Force proxy protocol to allow HTTP-over-HTTPS
Browse files Browse the repository at this point in the history
  • Loading branch information
lovell committed Jan 13, 2017
1 parent 4730554 commit 4a03d11
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions binding.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ module.exports.download_vips = function () {
} catch (err) {}
});
});
const gotOpt = {};
if (process.env.npm_config_https_proxy) {
// Use the NPM-configured HTTPS proxy
gotOpt.agent = caw(process.env.npm_config_https_proxy);
}
const gotOpt = {
agent: caw(null, {
protocol: 'https'
})
};
const url = distBaseUrl + tarFilename;
got.stream(url, gotOpt).on('response', function (response) {
if (response.statusCode !== 200) {
Expand Down

0 comments on commit 4a03d11

Please sign in to comment.