Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

If you are using a Load Balancer that offloads HTTPS, FlexDeploy will see the incoming connections from the load balancer as HTTP. This will cause it to generate relative paths with http:// instead of https://. Those URLS are redirected by the load balancer, starting a infinite loop. There is a great article about it here: https://community.pivotal.io/s/article/Purpose-of-the-X-Forwarded-Proto-HTTP-Header?language=en_US

To avoid that loop, 1 Have have the load balancer set X-Forwarded-Proto to https and use a Valve to determine when to set HTTP/HTTPS.

2 1 In your server.xml in the host section where you will see other valves add an additional valve:

...

  • Modify the ip addresses shown here to your Load Blanacer IP addresses.

  • Keep the format of the ip addresses like this in regex format \. instead of ., and use | for OR.

3 2 in your load balancer configuration, set the X-Forwarded-Proto header.

...