mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
fixes after PR review
This commit is contained in:
parent
a05fc2d169
commit
9752652e76
@ -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);
|
||||
|
||||
@ -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');
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user