Dec 4, 2014
0
Level 1
HTTPS on heroku
Not sure if anyone else is having a similar issue and gave up, but here goes:
I'm hosting an app on heroku and am using CloudFlare's free SSL to serve all traffic over HTTPS.
Here's the following from my app/filters.php file:
App::before(function($request)
{
if ((Request::header('x-forwarded-proto') <> 'https') && !App::environment('local'))
{
return Redirect::secure(Request::getRequestUri());
}
});
For some reason, this breaks all the forms as none of them seem to POST to where they should.
Can anyone help? Thanks!
Please or to participate in this conversation.