From dda6f7a45a46d2bf63e482d0b47b7c36ae548546 Mon Sep 17 00:00:00 2001 From: yawnt Date: Tue, 5 Nov 2013 17:44:04 +0100 Subject: [PATCH] [feature] add emit proxyRes --- lib/http-proxy/passes/web-incoming.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/http-proxy/passes/web-incoming.js b/lib/http-proxy/passes/web-incoming.js index 92737525f..c3bc063dd 100644 --- a/lib/http-proxy/passes/web-incoming.js +++ b/lib/http-proxy/passes/web-incoming.js @@ -117,6 +117,7 @@ web_o = Object.keys(web_o).map(function(pass) { (options.buffer || req).pipe(proxyReq); proxyReq.on('response', function(proxyRes) { + server.emit('proxyRes', proxyRes); for(var i=0; i < web_o.length; i++) { if(web_o[i](req, res, proxyRes)) { break; } }