Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the emitter of the proxyResponse event #385

Merged
merged 1 commit into from Mar 18, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/node-http-proxy/http-proxy.js
Expand Up @@ -318,7 +318,7 @@ HttpProxy.prototype.proxyRequest = function (req, res, buffer) {
});

// Allow observer to modify headers or abort response
try { req.emit('proxyResponse', req, res, response) }
try { self.emit('proxyResponse', req, res, response) }
catch (ex) {
errState = true;
return;
Expand Down
1 change: 1 addition & 0 deletions lib/node-http-proxy/routing-proxy.js
Expand Up @@ -116,6 +116,7 @@ RoutingProxy.prototype.add = function (options) {
'start',
'forward',
'end',
'proxyResponse',
'websocket:start',
'websocket:end',
'websocket:incoming',
Expand Down