Following Engine Yard docs https://support.cloud.engineyard.com/entries/21715452-use-elastic-load-balancing-with-engine-yard-cloud
Got this setup and seemed to work well, allowing us to use SSL terminated on ELB instead on the server. Theoretically, this should allow us to use several SSL certificates in the same environment.
This setting means that the traffic between the browser and the ELB balancer is SSL, but the ongoing traffic from ELB to the application servers is decrypted. This caused us a problem with our rails 3.2.8 application, which forcedly uses SSL - it redirects each decrypted request back to it with the https equivalent, which again sends the decrypted request from the load balancer to the application server, causing an infinite loop condition.
If we turn off the forced use of SSL in our application, we need to test each request to see if it comes from an SSL connection, if we could respond, if not, redirect it.
According to this release note ( http://aws.amazon.com/releasenotes/7778622769836370 ), the ELB will send an X-Forwarded-Proto header containing "https" when traffic is being transferred from an https connection.
First, there is no header in the Engine Jard request called "X-Forwarded-Proto." "HTTP_X-FORWARDED_PROTO" exists, but it always contains "http", even when traffic is sent via SSL to the ELB.
Can anyone suggest any idea on this or ideas on a workaround? I tried EY support without much luck.
source share