From 3c91ed3d26d9af640d0c7a09fb9cdaf80ad673ca Mon Sep 17 00:00:00 2001 From: yawnt Date: Sun, 15 Sep 2013 13:03:51 +0200 Subject: [PATCH] [fix] proxy to http(s) --- lib/caronte/passes/ws.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/caronte/passes/ws.js b/lib/caronte/passes/ws.js index baf13a7..1fd3fd7 100644 --- a/lib/caronte/passes/ws.js +++ b/lib/caronte/passes/ws.js @@ -75,7 +75,7 @@ function XHeaders(req, socket, options) { function stream(req, socket, options, head) { common.setupSocket(socket); - var proxyReq = (options.ssl ? https : http).request( + var proxyReq = (~['https:', 'wss:'].indexOf(options.target.protocol) ? https : http).request( common.setupOutgoing(options.ssl || {}, options, req) );