session cookie httponly false rails 3.1(session cookie httponly false rails 3.1)

编程入门 行业动态 更新时间:2024-10-19 06:17:40
session cookie httponly false rails 3.1(session cookie httponly false rails 3.1)

我正试图关闭httponly以用于phonegap。 我正在使用rails 3.1和devise,每个都报告(但没有记录)这样做的方法,其中没有一个工作:

# application.rb config.session_options = { :httponly => false } # no effect config.session = { :httponly => false } # undefined method `session=' # devise.rb config.cookie_options = { :httponly => false } # also no effect

测试我重新启动服务器,删除现有的cookie,并重新加载页面。 仍然在chrome调试器中检查了“Http”列。

帮帮我!

I'm trying to turn httponly off for use in phonegap. I'm useing rails 3.1 and devise, each of which have reported (but not documented) ways of doing this, none of which work:

# application.rb config.session_options = { :httponly => false } # no effect config.session = { :httponly => false } # undefined method `session=' # devise.rb config.cookie_options = { :httponly => false } # also no effect

to test I restarted the server, deleted the existing cookie, and reloaded the page. 'Http' column was still checked in the chrome debugger.

help!

最满意答案

这个小片段似乎有用:

Testapp::Application.config.session_store :cookie_store, key: '_testapp_session', :domain => :all, :httponly => false

This little snippet seems to work :

Testapp::Application.config.session_store :cookie_store, key: '_testapp_session', :domain => :all, :httponly => false

更多推荐

httponly,devise,cookie,chrome,电脑培训,计算机培训,IT培训"/> <meta name="

本文发布于:2023-08-06 00:14:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1440955.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:httponly   cookie   session   rails   false

发布评论

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

>www.elefans.com

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