1

After reading this, it sounds like config.force_ssl = true should be the default, why did the rails team not make it default when creating a new app (inside config/environments/production.rb)?

Henry Yang
  • 2,283
  • 3
  • 21
  • 38

2 Answers2

1

Because not all servers will use ssl. You need to set config.force_ssl = true only if you're using valid ssl cert.

Roman Kiselenko
  • 43,210
  • 9
  • 91
  • 103
1

You might be running a test instance in production mode on your local system, which might not require SSL. So it's better to let the user decide if they require SSL or not.

Ravi Teja Dandu
  • 466
  • 2
  • 7