diff --git a/examples/http/proxy-https-to-https.js b/examples/http/proxy-https-to-https.js index b35ecc3..af0d922 100644 --- a/examples/http/proxy-https-to-https.js +++ b/examples/http/proxy-https-to-https.js @@ -46,7 +46,8 @@ https.createServer(helpers.https, function (req, res) { httpProxy.createServer(8000, 'localhost', { https: helpers.https, target: { - https: true + https: true, + rejectUnauthorized: false } }).listen(8080); diff --git a/test/helpers/http.js b/test/helpers/http.js index b91478f..3479626 100644 --- a/test/helpers/http.js +++ b/test/helpers/http.js @@ -91,6 +91,7 @@ exports.createProxyServer = function (options, callback) { if (protocols.proxy === 'https') { options.proxy.https = helpers.https; } + options.proxy.rejectUnauthorized = false; return httpProxy .createServer(options.proxy) diff --git a/test/macros/http.js b/test/macros/http.js index dcb4256..767b7db 100644 --- a/test/macros/http.js +++ b/test/macros/http.js @@ -27,6 +27,7 @@ exports.assertRequest = function (options) { // // Now make the HTTP request and assert. // + options.request.rejectUnauthorized = false; request(options.request, this.callback); }, "should succeed": function (err, res, body) { @@ -320,4 +321,4 @@ exports.assertProxiedToRoutes = function (options, nested) { } return context; -}; \ No newline at end of file +};