Rails宝典八十四式:Cookie Based Session Store

Rails 2.0将默认使用CookieStore来存储session数据,这符合SNA,很好
如果从Rails 1.x迁移到Rails 2.0,需要这样配置一下:
# in environment.rb
Rails::Initializer.run do |config|
  config.action_controller.session = {
    :session_key => '_store_session',
    :secret      => '851939c37d94574e284ded8437d4ea3447dae24cc5bda61d8eaf2731d49273bc4c620'
  }
end


关于Cookie based session store的安全问题大家不用过分担心,详情请看: http://izumi.plan99.net/blog/index.php/2007/11/25/rails-20-cookie-session-store-and-security/

你可能感兴趣的:(.net,PHP,Security,Blog,Rails)