Skip to content

Commit

Permalink
Add the req and res objects to the proxyRes event
Browse files Browse the repository at this point in the history
  • Loading branch information
bruce-one committed May 11, 2014
1 parent c472527 commit 1213e46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/http-proxy/passes/web-incoming.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ web_o = Object.keys(web_o).map(function(pass) {
(options.buffer || req).pipe(proxyReq);

proxyReq.on('response', function(proxyRes) {
if(server) { server.emit('proxyRes', proxyRes); }
if(server) { server.emit('proxyRes', proxyRes, req, res); }
for(var i=0; i < web_o.length; i++) {
if(web_o[i](req, res, proxyRes)) { break; }
}
Expand Down

0 comments on commit 1213e46

Please sign in to comment.