Skip to content

Commit

Permalink
[fix]
Browse files Browse the repository at this point in the history
  • Loading branch information
yawnt committed Oct 9, 2013
1 parent 3d8e538 commit a9f9e21
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/http-proxy/index.js
Expand Up @@ -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); });
Expand Down

0 comments on commit a9f9e21

Please sign in to comment.