Safari does not set cookie but Chrome and Firefox do

寵の児 提交于 2020-03-24 04:08:08

问题


I'm sending requests from the localhost to third party server to get data using REST API. Backend uses cookies ("JSESSIONID") to understand either send data or not. All works fine in Chrome, and I can see Cookies in the Application tab of the Chrome browser, with some data. But this specific key ("JSESSIONID") is not set as a value. Meanwhile in Safari Cookies tab does not contain any value, but I can see this line in Response:

Set-Cookie: JSESSIONID=FE833C57BF6448BBF12036948C337372A2CFD793F3C7.devOrderEntry; Path=/orderEntry; HttpOnly

In the same time, the backend is waiting for the Cookie with this param from the client, and this param is empty in Safari's header.

I use axios for XMLHttpRequests, and webpack as builder. I tried several things such as withCredentials: true, or set 'max-length' for 1 year, but it did not worked. Please advice something!

This is how it works in Firefox:

And in Safari:

来源:https://stackoverflow.com/questions/53082080/safari-does-not-set-cookie-but-chrome-and-firefox-do

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