force_ssl redirect loop on Rails 4 using CloudFlare SSL This stopped happening when I switched from "flexible" to the "full" SSL setting in CloudFlare.