1

ユーザーコントローラーに force_ssl オプションを追加しました

Class UserController < ApplicationController 
  force_ssl :only => [:login_form, :register]
end

コントローラーで両方のメソッドを定義していますが、ブラウザーに次のようなエラーが表示されています

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 

Firefox の場合

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 で実行されており、本番環境では上記のエラーが表示されます

4

0 に答える 0