我在用户控制器中添加了 force_ssl 选项
Class UserController < ApplicationController
force_ssl :only => [:login_form, :register]
end
我在 Controller 中定义了这两种方法,我的浏览器将错误显示为
在 Chrome 中
SSL connection error
Unable to make a secure connection to the server. This may be a problem with the server,
or it may be requiring a client authentication certificate that you don't have.
Error 107 (net::ERR_SSL_PROTOCOL_ERROR): SSL protocol error. An error occurred during a
在火狐中
connection to localhost:3000.
SSL received a record that exceeded the maximum permissible length.
(Error code: ssl_error_rx_record_too_long)
并且服务器日志正在显示
!! Invalid request
应用程序在开发环境中运行,但不是使用 https,而是使用 http,并且在生产环境中显示上述错误