Commit e3d95eca authored by Dominic Tarr's avatar Dominic Tarr

[minor] default enableXForwarded to true

parent 5d33ad71
......@@ -341,7 +341,8 @@ HttpProxy.prototype.proxyRequest = function (req, res, options) {
options = options || {};
options.host = options.host || this.target.host;
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
......@@ -589,7 +590,7 @@ HttpProxy.prototype.proxyWebSocketRequest = function (req, socket, head, options
options = options || {};
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) {
location = this.proxyTable.getProxyLocation(req);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment