From 0532995dfa0be53d285c886a9922b8915f297d36 Mon Sep 17 00:00:00 2001 From: Christian Tellnes Date: Thu, 17 May 2012 05:44:56 +0200 Subject: [PATCH] Implement RoutingProxy.prototype.remove --- lib/node-http-proxy/routing-proxy.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/node-http-proxy/routing-proxy.js b/lib/node-http-proxy/routing-proxy.js index b76924634..9707da279 100644 --- a/lib/node-http-proxy/routing-proxy.js +++ b/lib/node-http-proxy/routing-proxy.js @@ -120,7 +120,11 @@ RoutingProxy.prototype.add = function (options) { // for the specified `options.host` and `options.port` (if they exist). // RoutingProxy.prototype.remove = function (options) { - var key = this._getKey(options); + var key = this._getKey(options), + proxy = this.proxies[key]; + + delete this.proxies[key]; + return proxy; }; //