Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[minor] default enableXForwarded to true

  • Loading branch information...
commit e3d95ecab24700535184df32f3a97e8699099b7f 1 parent 5d33ad7
Dominic Tarr dominictarr authored

Showing 1 changed file with 4 additions and 3 deletions. Show diff stats Hide diff stats

  1. +4 3 lib/node-http-proxy.js
7 lib/node-http-proxy.js
@@ -341,7 +341,8 @@ HttpProxy.prototype.proxyRequest = function (req, res, options) {
341 341 options = options || {};
342 342 options.host = options.host || this.target.host;
343 343 options.port = options.port || this.target.port;
344   - options.enableXForwarded = options.enableXForwarded || false;
  344 + options.enableXForwarded =
  345 + (undefined === options.enableXForwarded ? true : options.enableXForwarded);
345 346
346 347 //
347 348 // Check the proxy table for this instance to see if we need
@@ -589,8 +590,8 @@ HttpProxy.prototype.proxyWebSocketRequest = function (req, socket, head, options
589 590
590 591 options = options || {};
591 592 options.host = options.host || this.target.host;
592   - options.port = options.port || this.target.port; //
593   -
  593 + options.port = options.port || this.target.port;
  594 +
594 595 if (this.proxyTable && !options.host) {
595 596 location = this.proxyTable.getProxyLocation(req);
596 597

0 comments on commit e3d95ec

Please sign in to comment.
Something went wrong with that request. Please try again.