mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
[fix] typo
This commit is contained in:
parent
bd62a68017
commit
492134f830
@ -24,11 +24,12 @@
|
||||
|
||||
*/
|
||||
|
||||
var events = require('events'),
|
||||
http = require('http'),
|
||||
util = require('util'),
|
||||
url = require('url'),
|
||||
httpProxy = require('../node-http-proxy');
|
||||
var events = require('events'),
|
||||
http = require('http'),
|
||||
util = require('util'),
|
||||
url = require('url'),
|
||||
ForwardStream = require('./streams/forward'),
|
||||
httpProxy = require('../node-http-proxy');
|
||||
|
||||
//
|
||||
// ### function HttpProxy (options)
|
||||
@ -97,7 +98,6 @@ var HttpProxy = exports.HttpProxy = function (options) {
|
||||
this.enable.xforward = true;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Setup additional options for WebSocket proxying. When forcing
|
||||
// the WebSocket handshake to change the `sec-websocket-location`
|
||||
@ -170,7 +170,7 @@ HttpProxy.prototype.proxyRequest = function (req, res, buffer) {
|
||||
//
|
||||
if (this.forward) {
|
||||
this.emit('forward', req, res, this.forward);
|
||||
this._forwardRequest(req);
|
||||
req.pipe(new ForwardStream(this.forward));
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@ -31,7 +31,8 @@ var ForwardStream = module.exports = function ForwardStream(options) {
|
||||
outgoing[elem] = req[elem];
|
||||
});
|
||||
|
||||
self.request = protocol.request(outgoing)
|
||||
// pipe throw-safe? do we need to add a ` on 'error' ` handler?
|
||||
self.request = protocol.request(outgoing, function() {});
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user