Ajay
Ajay

Reputation: 4251

My rails app is auto redirecting to https from http in production mode

My Rails application is working fine on dev mode. In production mode the localhost:3000 is also opening nicely(with http), but on clicking signup link,

it's auto redirecting to "https://localhost/signup".

In production.rb file, i have marked

config.force_ssl = false 

still it's auto redirecting to https from http.

Few links are working fine, where as in others the url is appended with https and no content is visible. There is no trace in log/terminal for this issue. I am using Rails 4.

Upvotes: 3

Views: 1849

Answers (2)

Darkaico
Darkaico

Reputation: 1256

you need to update your production.rb with the following

  config.assume_ssl = false
  config.force_ssl = false

and also verify that in your browser your using http:// (instead of https://) and you could verify it in different browsers to avoid cache

Upvotes: 0

Agis
Agis

Reputation: 33646

Do this to find out if you are enforcing HTTPS in your controller or routes.

$ git grep force_ssl app/controllers
$ git grep https config/routes.rb

Upvotes: 0

Related Questions