新しいRails 3.xのセッション設定オプションは何かを指摘できますか?Rails 3つの追加のセッション設定オプション(key、expires_after、secure)
私はRails 2.3.xアプリケーションと同じ設定を複製しようとしています。
これは、私がアプリケーションで使用される設定です:
#environment.rb
config.action_controller.session_store = :active_record_store
config.action_controller.session = {
:key => '_something', #non-secure for development
:secret => 'really long random string'
}
# production.rb - override environment.rb for production
config.action_controller.session = {
:key => '_something_secure',
:secret => 'really long random string',
:expire_after => 60*60,#time in seconds
:secure => true #The session will now not be sent or received on HTTP requests.
}
しかし、Railsの3.xの中で、私は次の言及を見つけることができます。
AppName::Application.config.session_store :active_record_store
AppName::Application.config.secret_token = 'really long random string'
AppName::Application.config.cookie_secret = 'another really long random string'
は、他の設定はありますキーを制御する設定、expire_after時間、安全なオプション?
「config.force_ssl = true」がproduction.rbに設定されている場合、私は安全なオプションが不要になったと思いますか?
ありがとうございました!
有効期限:http://stackoverflow.com/questions/5860950/setting-session-timeout-in-rails-3はセキュア –
:http://stackoverflow.com/質問/ 72242/how-do-i-set-the-httponly-flag-on-cookie-in-rails –