![](/img/trans.png)
[英]Getting an ActionController::InvalidAuthenticityToken for my XML
[英]Why am I getting ActionController::InvalidAuthenticityToken with every post of my form?
我们刚刚推出了对我们的应用程序的更新,它切换到 mem_cache_store 进行会话。 立即,forms 的所有帖子都引发了 ActionController::InvalidAuthenticityToken 异常。 我知道 2.3.9 中存在此问题,但我们使用的是 2.3.10。
production.rb 中的配置更改为:
require_library_or_gem 'memcache'
config.action_controller.session_store = :mem_cache_store
config.action_controller.session = {
:secure => true,
:cache => MemCache.new('our.memcache.host', :namespace => 'rack:session')
}
难道我做错了什么?
每次移动 session 存储时,都需要重命名 session 密钥,以防止出现 ActionController::InvalidAuthenticityToken 错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.