ActionController::InvalidAuthenticityToken in Admin#index 错误解决方法
2008-07-14 16:15
525 查看
Rails升级到2.0以后的版本,为了防止跨站攻击脚本,Rails出现了一个新功能,添加了跳转认证。出现ActionController::InvalidAuthenticityToken in
的解决方法是把envitonment的 config.action_controller.session = {
:session_key => '_Senco_session',
:secret => 'd3cc18c011db1e7e522380293b30fbda177f8ef3de710bded62e6893bfa2739bc6000a9ab807586cbbf5685dc0736f17c5e6d23322bc5f69a9c295f63adffcee'
}中的:secret值添加到Controller下。
不知道各位还有没有比较好的解决办法
ActionController::InvalidAuthenticityToken in
Admin#index
的解决方法是把envitonment的 config.action_controller.session = {:session_key => '_Senco_session',
:secret => 'd3cc18c011db1e7e522380293b30fbda177f8ef3de710bded62e6893bfa2739bc6000a9ab807586cbbf5685dc0736f17c5e6d23322bc5f69a9c295f63adffcee'
}中的:secret值添加到Controller下。
不知道各位还有没有比较好的解决办法
相关文章推荐
- 【原创】FireFox 下出现 “invalid range in character class ”错误的解决方法
- Django Ubuntu:Database returned an invalid value in QuerySet.dates(). 错误的解决方法
- Tomcat 8.5 400错误:Invalid character found in the request target. 问题解决方法
- Tomcat 400错误:Invalid character found in the request target. 问题解决方法
- mysql中You can’t specify target table for update in FROM clause错误解决方法
- 错误Name node is in safe mode的解决方法
- mysql中You can’t specify target table for update in FROM clause错误解决方法
- 空间展示应用的java.lang.UnsatisfiedLinkError:no orgal in java.library.path错误解决方法
- Maven错误:XXX时出错; invalid LOC header (bad signature)的解决方法
- SyntaxError:Unexpected token < 错误解决方法
- js中出现TypeError: invalid 'in' operand a的错误解决
- three.js_82 出现WebGL: INVALID_OPERATION: copyTexImage2D: framebuffer is incompatible format错误解决方法
- java.lang.IllegalArgumentException: Illegal character in path at index ZZ: XXXXXXX 解决方法
- Relocations in generic ELF (EM: 3)错误的解决方法
- python处理字符串时出现的错误'ascii' codec can't decode byte 0xe9 in position 0: ordinal not in range(128)" 解决方法
- Android笔记:android.view.WindowManager$BadTokenException错误解决方法
- java.io.InvalidClassException:PublishInfMsg(类名); local class incompatible: 解决方法
- 成功解决RecyclerView Bug:IndexOutOfBoundsException: Inconsistency detected. Invalid item position
- koala 编译 sass 出现 Syntax error: Invalid GBK character 中文错误解决方法
- 【Linux学习】Linux报“xxx is not in the sudoers file.This incident will be reported” 错误解决方法