Safari can't get HEROKU's cookie

谁都会走 提交于 2019-12-24 03:22:45

问题


I am sorry that I am not able to provide much info because I totally have no idea about this weird problem.

I have a fb canvas app which is written by rails 3.2.2 .

There is not any problem on my local machine (Mac OS X 10.7.4).

When I deploy it to heroku, it is fine with chrome and firefox. However, when I use Safari to browse it, Safari can't get any cookie from heroku. (it shows "This site has no cookies" in developer tool, but it works well on my local machine.)

I have googled this problem, and I get something like this and this, but I don't think these are the case of mine.

any suggestion?

If you need any specific info about my code to solve this problem, please let me know.

I will appreciate it very very much!!


回答1:


I finally found out that it's a problem of safari's security setting.

As fb canvas gets heroku's content through iframe, there may be security issues. If we donwgrade the 'Block cookies' of safari's privacy settings from 'From third parties and advertisers'(default) to 'Never', everything works well!

However, I don't think asking users to downgrade their security settings is a good idea. I am wondering whether there is a solution to avoid this restriction in safari.

please let me know if you have any idea. many thanks :)



来源:https://stackoverflow.com/questions/10773897/safari-cant-get-herokus-cookie

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!