Determing scheme behind Cloudfront or CloudFlare

There's this discussion in the open community: https://open.vanillaforums.com/discussion/33037/wip-notes-on-scaling-vanilla-on-aws-ec2

Determing http vs. https in Vanilla is done in PHP by seeing the current scheme. This is all well and good until SSL terminates before the server running Vanilla.

We also have had multiple issues with XO Group's CloudFlare implementation over the years, the lastest being that forcing SSL caused an infinite redirect loop since they terminate SSL at CloudFlare - Vanilla saw it as HTTP and redirected. They fixed this on their side after debugging with us on the phone for half an hour, but I'm unsure what their solution was since I'm not familiar with CloudFlare.

As these setups become more common, what's our best strategy to support them?

Comments