Rails 3 SSL Deprecation

后端 未结 4 859
感动是毒
感动是毒 2020-11-27 10:13

I am upgrading an application to Rails 3.0.0 and am wondering if the standard method for adding SSL has changed (I vaguely remember demos indicating the router could now han

4条回答
  •  爱一瞬间的悲伤
    2020-11-27 10:41

    Toppic is old but just for googling people:

    in *app/controller/your_controller.rb*

     class LostPasswordsController < ApplicationController
    
       force_ssl
    
       def index
         #....
       end
     end 
    

    if globally use it in application controller

    http://apidock.com/rails/ActionController/ForceSSL/ClassMethods/force_ssl

    ...thx S.L. for tip

提交回复
热议问题