mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
Merge pull request #11 from jcrugzz/https-req-ws
[fix] add ability to proxy websockets over HTTPS
This commit is contained in:
commit
46fe81e11a
@ -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)
|
||||
);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user