mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
Merge pull request #729 from lightblade/master
websocket needs to respect `options.secure` too
This commit is contained in:
commit
57329b6327
@ -39,7 +39,7 @@ common.setupOutgoing = function(outgoing, options, req, forward) {
|
||||
extend(outgoing.headers, options.headers);
|
||||
}
|
||||
|
||||
if (options[forward || 'target'].protocol == 'https:') {
|
||||
if (~['https:', 'wss:'].indexOf(options[forward || 'target'].protocol)) {
|
||||
outgoing.rejectUnauthorized = (typeof options.secure === "undefined") ? true : options.secure;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user