Merge pull request #11 from jcrugzz/https-req-ws

[fix] add ability to proxy websockets over HTTPS
This commit is contained in:
yawnt 2013-09-15 02:22:49 -07:00
commit 46fe81e11a

View File

@ -1,4 +1,5 @@
var http = require('http'),
https = require('https'),
common = require('../common'),
passes = exports;
@ -74,7 +75,7 @@ function XHeaders(req, socket, options) {
function stream(req, socket, options, head) {
common.setupSocket(socket);
var proxyReq = http.request(
var proxyReq = (options.ssl ? https : http).request(
common.setupOutgoing(options.ssl || {}, options, req)
);