[英]How should I use https in Ruby on Rails
I'm developing an application in Rails (2.3.4) and there are some parts that need to run over a secure protocol, for example, the login form, the credit card form, etc. 我正在用Rails(2.3.4)开发应用程序,其中有些部分需要在安全协议上运行,例如,登录表单,信用卡表单等。
Configure apache to use SSL for the paths that require it (ie, '/login' etc.). 配置apache以将SSL用于需要它的路径(即'/ login'等)。
You'll also need to configure your routes to use https: 您还需要将路由配置为使用https:
map.resources :login, :requirements => { :protocol => 'https' }
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.