I have a Ruby on Rails application and it works on Heroku using HTTP. Now it's time to use HTTPS during the login process and for all transactions after the user logs in. But I'm not sure where to start.
Configuration
We use:
Ruby (1.9.2) Rails (3.0.5) Devise (1.5.3)
Our domain (registered by GoDaddy) is oursite.com (and not its real name), which resolves oursite.herokuapp.com . I want secure transactions to be executed in the https://secure.oursite.com subdomain. I purchased an SSL certificate from GoDaddy, created key files, registered for the Zerigo DNS service, and installed sitesite.com site name servers on Zergo servers. And on Heroku I did:
heroku domains:add secure.oursite.com heroku ssl:add final.crt site.key heroku addons:add ssl:hostname
the questions
- If a user comes to our site under
http://oursite.com , how (and when) do I switch to https://secure.oursite.com ? - How to force use https for any secure transaction (for example, to send a password)?
- How to check this stuff with localhost: 3000?
Specific answers, general answers, and pointers to study guides and examples are equally welcome. Thanks!
source share