Add the req and res objects to the proxyRes event

This commit is contained in:
Bryce Gibson 2014-05-08 10:07:18 +10:00
parent c472527ea6
commit 1213e46b1b

View File

@ -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; }
}