mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
Extend listen to enable IPv6 support.
This commit is contained in:
parent
3e47c2485c
commit
96ea631fb6
@ -111,7 +111,7 @@ function ProxyServer(options) {
|
||||
|
||||
require('util').inherits(ProxyServer, EE3);
|
||||
|
||||
ProxyServer.prototype.listen = function(port) {
|
||||
ProxyServer.prototype.listen = function(port, hostname) {
|
||||
var self = this,
|
||||
closure = function(req, res) { self.web(req, res); };
|
||||
|
||||
@ -123,7 +123,7 @@ ProxyServer.prototype.listen = function(port) {
|
||||
this._server.on('upgrade', function(req, socket, head) { self.ws(req, socket, head); });
|
||||
}
|
||||
|
||||
this._server.listen(port);
|
||||
this._server.listen(port, hostname);
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user