Rails 3.1 Force Regular HTTP

后端 未结 6 2112
清歌不尽
清歌不尽 2020-12-14 11:35

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 t

6条回答
  •  南方客
    南方客 (楼主)
    2020-12-14 12:00

    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.

提交回复
热议问题