Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Heroku apps automatically redirected to HTTPS

I have a Rails 4 app, deployed on Heroku. I want my app to be served via pure HTTP, not HTTPS. So I haven't done anything special to configure HTTPS redirect (at least I think so). But nevertheless, my app got a redirect to https every time I visit it. It behaves the same way in both cases, via subdomain.herokuapp.com and via my-subdomain.mydomain.tld, e.g. prepends https:// to the address. Which in turn (naturally) causes browser warnings about security.

Can I disable such behaviour?

By the way, mydomain.tld and www.mydomain.tld both work without this strange redirection, as well as a dummy app generated just for this purpose.

like image 402
Sergey V. Avatar asked Aug 25 '13 09:08

Sergey V.


1 Answers

It caused by config.force_ssl = true in production.rb

like image 128
Sergey V. Avatar answered Oct 13 '22 22:10

Sergey V.