Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
412 views
in Technique[技术] by (71.8m points)

javascript - 未在生产环境中设置Cookie。 (Nodejs,角)(Cookies are not set in production env. (Nodejs, angular))

I am working on my app and I have an issue with cookies.

(我正在使用我的应用程序,但Cookie出现问题。)

To be more specific - cookies are probably not send from an iPhone (chrome, safari).

(更具体地说-Cookie可能不是从iPhone(Chrome,Safari)发送的。)

Wierd part is that when I open my app on any other device (in production) everything works nice as I expect.

(更奇怪的是,当我在生产中的任何其他设备上打开我的应用程序时,一切都按我的预期运行良好。)

Only on iPhone, cookies are not send with each request (I can see in the logs, that cookie object is null).

(仅在iPhone上,cookie不会随每个请求发送(我在日志中可以看到,该cookie对象为null)。)

When I open my app on PC and inspect cookies in chrome dev tool, they are not there, but when I ran my app on dev server, everything works just fine and even cookies are in the dev tools.

(当我在PC上打开我的应用程序并在chrome dev工具中检查cookie时,它们不存在,但是当我在dev服务器上运行我的应用程序时,一切正常,甚至cookie都在dev工具中。)

Also, I am getting this warning in chrome, but i don't know if this has any association with my problem.

(另外,我在Chrome中收到此警告,但我不知道这是否与我的问题有关。)

A cookie associated with a cross-site resource at domain.com was set without the SameSite attribute.

(设置了与domain.com上的跨站点资源关联的cookie, SameSite设置SameSite属性。)

A future release of Chrome will only deliver cookies with cross-site requests if they are set with SameSite=None and Secure .

(如果将来的Chrome浏览器版本设置了SameSite=NoneSecure ,则仅会发送带有跨站点请求的Cookie。)

Do you have any idea, why this is happening?

(您有什么想法,为什么会这样?)

Thanks for your advices

(感谢您的建议)

  ask by Petr Jelínek translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...