Sergey V.
Sergey V.

Reputation: 611

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.

Upvotes: 13

Views: 2728

Answers (1)

Sergey V.
Sergey V.

Reputation: 611

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

Upvotes: 29

Related Questions