mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
[minor] default enableXForwarded to true
This commit is contained in:
parent
5d33ad7118
commit
e3d95ecab2
@ -341,7 +341,8 @@ HttpProxy.prototype.proxyRequest = function (req, res, options) {
|
|||||||
options = options || {};
|
options = options || {};
|
||||||
options.host = options.host || this.target.host;
|
options.host = options.host || this.target.host;
|
||||||
options.port = options.port || this.target.port;
|
options.port = options.port || this.target.port;
|
||||||
options.enableXForwarded = options.enableXForwarded || false;
|
options.enableXForwarded =
|
||||||
|
(undefined === options.enableXForwarded ? true : options.enableXForwarded);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Check the proxy table for this instance to see if we need
|
// Check the proxy table for this instance to see if we need
|
||||||
@ -589,7 +590,7 @@ HttpProxy.prototype.proxyWebSocketRequest = function (req, socket, head, options
|
|||||||
|
|
||||||
options = options || {};
|
options = options || {};
|
||||||
options.host = options.host || this.target.host;
|
options.host = options.host || this.target.host;
|
||||||
options.port = options.port || this.target.port; //
|
options.port = options.port || this.target.port;
|
||||||
|
|
||||||
if (this.proxyTable && !options.host) {
|
if (this.proxyTable && !options.host) {
|
||||||
location = this.proxyTable.getProxyLocation(req);
|
location = this.proxyTable.getProxyLocation(req);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user