Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
Merge pull request #567 from cuongvo/master
Browse files Browse the repository at this point in the history
Added 'rejectUnauthorized' to support self-signed TLS certificates
  • Loading branch information
am11 committed Dec 10, 2014
2 parents 604e206 + 19fa669 commit e9b69ab
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ var fs = require('fs'),

function download(url, dest, cb) {
var file = fs.createWriteStream(dest);
var options = { proxy: getProxy() };
var options = { proxy: getProxy(), rejectUnauthorized: false };
var returnError = function(err) {
fs.unlink(dest);
cb(typeof err.message === 'string' ? err.message : err);
Expand All @@ -34,7 +34,7 @@ function download(url, dest, cb) {

req.end();
req.on('error', returnError);
};
}

/**
* Get proxy settings
Expand All @@ -60,7 +60,7 @@ function getProxy() {
}

var env = process.env;
return env.HTTPS_PROXY || env.https_proxy || env.HTTP_PROXY || env.http_proxy
return env.HTTPS_PROXY || env.https_proxy || env.HTTP_PROXY || env.http_proxy;
}

/**
Expand Down

0 comments on commit e9b69ab

Please sign in to comment.