fixes after PR review

This commit is contained in:
Laurent Brucher 2015-10-22 18:38:58 +02:00
parent a05fc2d169
commit 9752652e76
2 changed files with 2 additions and 2 deletions

View File

@ -89,7 +89,7 @@ var passes = exports;
);
// Enable developers to modify the proxyReq before headers are sent
if(server) { server.emit('proxyReqWs', proxyReq, req, socket, options, head); }
if (server) { server.emit('proxyReqWs', proxyReq, req, socket, options, head); }
// Error Handler
proxyReq.on('error', onOutgoingError);

View File

@ -456,7 +456,7 @@ describe('lib/http-proxy.js', function() {
ws: true
});
proxy.on('proxyReqWs', function(proxyReq, req, res, options) {
proxy.on('proxyReqWs', function(proxyReq, req, socket, options, head) {
proxyReq.setHeader('X-Special-Proxy-Header', 'foobar');
});