How do you guys set up your Rails 3.1 app to run HTTP and HTTPS in parallel on production?
Also how do you share the session between HTTP and HTTPS?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I use bartt/ssl_requirement which allows you to secure certain actions, like so:
For paths, you simply set
:secure => true:To disable in development, add this in the configure block of
config/environments/development.rb:And if you use a secure subdomain like I do on Heroku, you can add this to config/environments/production.rb:
as well as
:domain => :alltoconfig/initializers/session_store.rbso the session is shared across all domains. e.g.: