Skip to content

Commit 0532995

Browse files
committed
Implement RoutingProxy.prototype.remove
1 parent f223ce8 commit 0532995

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: lib/node-http-proxy/routing-proxy.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,11 @@ RoutingProxy.prototype.add = function (options) {
120120
// for the specified `options.host` and `options.port` (if they exist).
121121
//
122122
RoutingProxy.prototype.remove = function (options) {
123-
var key = this._getKey(options);
123+
var key = this._getKey(options),
124+
proxy = this.proxies[key];
125+
126+
delete this.proxies[key];
127+
return proxy;
124128
};
125129

126130
//

0 commit comments

Comments
 (0)