无法通过子域(owa_cookie)读取Cookie [英] Unable to read cookie across subdomains (owa_cookie)

查看:214
本文介绍了无法通过子域(owa_cookie)读取Cookie的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的生产环境中,我的前端位于a.example.com上,后端位于b.example.com上:

In my production environment, my front end is on a.example.com and my back end is on b.example.com:

我正在创建Cookie在.example.com域中的路径'/'中使用javascript从任何子域中读取。

I'm creating a cookie in .example.com domain in path '/' using javascript for it to be read from any subdomain.

当我尝试从b.example读取cookie时。 com从oracle使用owa_cookie它给出错误no_data_found。

When I try to read the cookie from b.example.com domain from Oracle using owa_cookie it gives the error no_data_found.

我查看了浏览器中的cookie的内容,我可以看到它:

I looked at the contents of the cookie in my browser and I could see it:

域.example.com

Domain .example.com

路径/

在我的测试环境中,我的前端和后端位于同一个子域b.example.com上。这里的Oracle应用程序服务器能够读取与完全相同的代码的cookie。

In my test environment, my front end and back end are on the same subdomain b.example.com. Here the Oracle Application server is able to read the cookie with the exact same code.

我做错了什么?根据我所读取的内容,我只需将Cookie存储在.example.com中,即可从任何子域中读取。

What am I doing wrong? From what I've read, I just need to store the cookie in .example.com for it to be read from any subdomain. But it still doesn't work.

推荐答案

如果您想跨子网域写入/读取Cookie,只需要保存in .example.com。问题是别的东西 - 这是一个名字不匹配。非常感谢。

If you want to write/read cookies across subdomains, you just need to save it in .example.com. The issue was something else - it was a name mismatch. Thanks folks.

这篇关于无法通过子域(owa_cookie)读取Cookie的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆