为什么在Rails 5.1中删除了session_store.rb?

时间:2017-06-12 19:12:17

标签: ruby-on-rails

Rails 5.1删除了config/initializers/session_store.rb文件。 upgrading guide没有提到它。有人可以解释为什么删除它以及我们应该如何处理现有文件?我当前的文件如下所示:

Rails.application.config.session_store(
  :cookie_store,
  :key => '_foo_session', # any value
  :secure => Rails.env.production? || Rails.env.staging?, # Only send cookie over SSL when in production and staging
  :http_only => true # Don't allow Javascript to access the cookie (mitigates cookie-based XSS exploits)
)

0 个答案:

没有答案