mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
Merge pull request #385 from nodejitsu/breaking-proxy-response
Change the emitter of the `proxyResponse` event
This commit is contained in:
commit
4335f49b0e
@ -318,7 +318,7 @@ HttpProxy.prototype.proxyRequest = function (req, res, buffer) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Allow observer to modify headers or abort response
|
// Allow observer to modify headers or abort response
|
||||||
try { req.emit('proxyResponse', req, res, response) }
|
try { self.emit('proxyResponse', req, res, response) }
|
||||||
catch (ex) {
|
catch (ex) {
|
||||||
errState = true;
|
errState = true;
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -116,6 +116,7 @@ RoutingProxy.prototype.add = function (options) {
|
|||||||
'start',
|
'start',
|
||||||
'forward',
|
'forward',
|
||||||
'end',
|
'end',
|
||||||
|
'proxyResponse',
|
||||||
'websocket:start',
|
'websocket:start',
|
||||||
'websocket:end',
|
'websocket:end',
|
||||||
'websocket:incoming',
|
'websocket:incoming',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user