From 19fa6690e924d45a4e7740264c0e011f3d813996 Mon Sep 17 00:00:00 2001 From: Cuong Vo Date: Tue, 9 Dec 2014 18:59:12 -0500 Subject: [PATCH] Added 'rejectUnauthorized' to support self-signed SSL certificates in install script --- scripts/install.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install.js b/scripts/install.js index 378af2bc9..a94d2e5b4 100644 --- a/scripts/install.js +++ b/scripts/install.js @@ -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); @@ -34,7 +34,7 @@ function download(url, dest, cb) { req.end(); req.on('error', returnError); -}; +} /** * Get proxy settings @@ -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; } /**