mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
[fix]
This commit is contained in:
parent
3d8e5383cd
commit
a9f9e21eda
@ -101,10 +101,11 @@ function ProxyServer(options) {
|
||||
|
||||
ProxyServer.prototype.listen = function(port) {
|
||||
var self = this,
|
||||
closure = function(req, res) { self.web(req, res); },
|
||||
this._server = options.ssl ?
|
||||
https.createServer(this.options.ssl, closure) :
|
||||
http.createServer(closure);
|
||||
closure = function(req, res) { self.web(req, res); };
|
||||
|
||||
this._server = options.ssl ?
|
||||
https.createServer(this.options.ssl, closure) :
|
||||
http.createServer(closure);
|
||||
|
||||
if(options.ws) {
|
||||
this._server.on('upgrade', function(req, socket, head) { self.ws(req, socket, head); });
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user