Ruby on Rails应用程序必须使用cookies吗?(are cookies mandatory for Ruby on Rails app?)

编程入门 行业动态 更新时间:2024-10-22 20:29:23
Ruby on Rails应用程序必须使用cookies吗?(are cookies mandatory for Ruby on Rails app?)

Rails是否依赖cookie? 看来,Flash是会话的一部分,并且会话使用cookie ...因此,当我在Firefox中禁用cookie时,正在工作的Rails应用程序显示

[错误] ActionController :: InvalidAuthenticityToken

因此,对于RoR应用程序来说,Cookie是强制性的吗?

更新:或者,为了让Rails应用程序再次工作,最简单的方法是什么? (如果它只有一台服务器(Apache运行mod_rails),那么更容易吗?)

is it true that Rails depend on cookies? It seems that flash is a part of session, and session uses cookies... so when i disable cookie in Firefox, a Rails app that was working shows

[error] ActionController::InvalidAuthenticityToken

so is it true that for a RoR app to work, cookies are mandatory?

Update: or, to make the Rails app work again, what is the simplest way? (and if it is one server only (Apache running mod_rails), then is it easier?)

最满意答案

他们不是强制性的,但有些事情你不能没有cookies。 您可以按照此处所述关闭真实性令牌。

They are not mandatory, but there are some things you can't do without cookies. You can turn the authenticity tokens off as described here.

更多推荐

本文发布于:2023-04-29 10:22:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1336312.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用程序   Rails   Ruby   app   mandatory

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!