Is there an easy way to enable SSL on the entire app?
I’m using rails 2.3.8
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.
By default, all of your controllers should inherit from
ApplicationController.ssl_requiredis actually backed by a protected method calledssl_required?which determines whether SSL is required for a given action. This implementation will make SSL always required in the production environment (but not otherwise, so you can still do development as usual).Depending on your environment, it may also be possible for the upstream server to only be available via HTTPS (e.g. if you’re using Apache, you could configure it not to serve your application over port 80). This depends on your server setup.