Symfony2 HTTPS requirement behind EC2 load balancer
===

What is a clean, Symfony way of ensuring HTTPS is being used in Symfony2 when behind an EC2 load balancer that is handling the SSL connection and sending it to you as HTTP. 

If you do something like requires_channel you get a redirect loop after the initial change to HTTPS because on the webserver itself you are still doing HTTP. The url does show HTTPS though, and Amazon provide a X-FORWARDED-PROTO header to use as well.

Is there a clean way of having symfony2 handle this kind of situation?