问题
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