Skip to content

Commit d1eabcc

Browse files
committed
websocket needs to respect options.secure too
1 parent 60bd697 commit d1eabcc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/http-proxy/common.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ common.setupOutgoing = function(outgoing, options, req, forward) {
3939
extend(outgoing.headers, options.headers);
4040
}
4141

42-
if (options[forward || 'target'].protocol == 'https:') {
42+
if (~['https:', 'wss:'].indexOf(options[forward || 'target'].protocol)) {
4343
outgoing.rejectUnauthorized = (typeof options.secure === "undefined") ? true : options.secure;
4444
}
4545

0 commit comments

Comments
 (0)