diff --git a/lib/caronte/passes/ws-incoming.js b/lib/caronte/passes/ws-incoming.js index ef88de3..e5bdcf6 100644 --- a/lib/caronte/passes/ws-incoming.js +++ b/lib/caronte/passes/ws-incoming.js @@ -75,6 +75,9 @@ function XHeaders(req, socket, options) { function stream(req, socket, options, head) { common.setupSocket(socket); + if (head && head.length) socket.unshift(head); + + var proxyReq = (~['https:', 'wss:'].indexOf(options.target.protocol) ? https : http).request( common.setupOutgoing(options.ssl || {}, options, req) );