[Ruby] How to redirect to http->https when SSL is made in Rails × Heroku environment

less than 1 minute read

config/environments/production.rb


   # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
   config.force_ssl = true # ← This is commented out, so just release it

Official documentation https://help.heroku.com/J2R1S4T8/can-heroku-force-an-application-to-use-ssl-tls