Skip to content

Commit 3c91ed3

Browse files
committed
[fix] proxy to http(s)
1 parent 46fe81e commit 3c91ed3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/caronte/passes/ws.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ function XHeaders(req, socket, options) {
7575
function stream(req, socket, options, head) {
7676
common.setupSocket(socket);
7777

78-
var proxyReq = (options.ssl ? https : http).request(
78+
var proxyReq = (~['https:', 'wss:'].indexOf(options.target.protocol) ? https : http).request(
7979
common.setupOutgoing(options.ssl || {}, options, req)
8080
);
8181

0 commit comments

Comments
 (0)