Rails 3.2 force_ssl except on landing page

2019-02-26 01:31发布

I want to enforce SSL on all routes except my landing page. I tried setting force_ssl in all my controllers, and for the controller that contains root, I did:

force_ssl :except => :index

However, after I deployed this to my staging app on Heroku, my app is still enforcing ssl on the home page. Is there something else that needs to be done to disable ssl on that specific route?

1条回答
神经病院院长
2楼-- · 2019-02-26 02:07

rack-ssl-enforcer gem will help you

查看更多
登录 后发表回答