1

只是想知道有没有办法从服务器端销毁 Rails 应用程序的所有会话。目前,如果有人登录,我们有一个自动重定向。我想为登录的用户停止它。我正在考虑重置安全令牌(在 application_controller 中)然后部署。但是我从文档中看到它引发了一个异常。在 Rails 3.2.0 中是否有清洁工可以做到这一点?

谢谢

4

1 回答 1

1

我将更改会话令牌,在config/initializers/secret_token.rb

# Your secret key for verifying the integrity of signed cookies.
# If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
MyAPP::Application.config.secret_token = 'ABC123'
于 2012-02-15T11:02:02.820 回答