mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
[fix] Partial fix for rejecting self-signed certs in tests
Since joyent/node@35607f3a2d, https and tls modules validate server certificate by default. Turn this feature off since we're using self-signed certificates in tests. Currently wss tests are still failing, pending investigation. Commited on a plane from Poznań to Munich.
This commit is contained in:
parent
eafdc744b6
commit
2e7d8a88f4
@ -46,7 +46,8 @@ https.createServer(helpers.https, function (req, res) {
|
|||||||
httpProxy.createServer(8000, 'localhost', {
|
httpProxy.createServer(8000, 'localhost', {
|
||||||
https: helpers.https,
|
https: helpers.https,
|
||||||
target: {
|
target: {
|
||||||
https: true
|
https: true,
|
||||||
|
rejectUnauthorized: false
|
||||||
}
|
}
|
||||||
}).listen(8080);
|
}).listen(8080);
|
||||||
|
|
||||||
|
|||||||
@ -91,6 +91,7 @@ exports.createProxyServer = function (options, callback) {
|
|||||||
if (protocols.proxy === 'https') {
|
if (protocols.proxy === 'https') {
|
||||||
options.proxy.https = helpers.https;
|
options.proxy.https = helpers.https;
|
||||||
}
|
}
|
||||||
|
options.proxy.rejectUnauthorized = false;
|
||||||
|
|
||||||
return httpProxy
|
return httpProxy
|
||||||
.createServer(options.proxy)
|
.createServer(options.proxy)
|
||||||
|
|||||||
@ -27,6 +27,7 @@ exports.assertRequest = function (options) {
|
|||||||
//
|
//
|
||||||
// Now make the HTTP request and assert.
|
// Now make the HTTP request and assert.
|
||||||
//
|
//
|
||||||
|
options.request.rejectUnauthorized = false;
|
||||||
request(options.request, this.callback);
|
request(options.request, this.callback);
|
||||||
},
|
},
|
||||||
"should succeed": function (err, res, body) {
|
"should succeed": function (err, res, body) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user