Previously, I had been using ssl_requirement to give us fine grained control over which pages were served over ssl and which were served over plain http.
According to the ssl_requirement’s own wiki, it has been superseded by rails 3.1’s Force SSL. However this does not seem to be the case. Force SSL doesn’t seem to expose an option to go in the opposite direction, there is no way to force a page to sent via regular http.
What is the correct Rails 3.1 way to force a page to be displayed in plain http? Does Force SSL truly supersede ssl_requirement?
The code for Force SSL is pretty easy to read.
https://github.com/rails/rails/blob/master/actionpack/lib/action_controller/metal/force_ssl.rb
It doesn’t seem to do the reverse and force http to be used. It provides the only and except options to control which actions and controllers SSL is to be required for, but doesn’t provide a way to force HTTP to be used instead of https.