在我制作的应用程序中,我收到了很多这样的消息:
A ActionController::InvalidAuthenticityToken occurred in items#vote_up:
ActionController::InvalidAuthenticityToken
/var/lib/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/request_forgery_protection.rb:79:in `verify_authenticity_token'
我怀疑它正在发生,因为人们在该页面上花费了大量时间而没有刷新它(它使用 ajax)并且令牌过期。
有没有办法让这些代币寿命更长?