Force SSL for specific routes in Rails 3.1
问题 I need to force SSL on all routes in my application except for landing#index . In config/application.rb , I have: config.force_ssl = true Then in landing_controller.rb , I have: force_ssl :except => :index However, all routes are still being redirected to https . Does anyone know how to conditionally force SSL in a Rails 3.1+ application? Solution: Add the following to your Gemfile : gem 'rack-ssl-enforcer' Add the following to your config/application.rb : config.middleware.use Rack: