I have Web application and API application.
These applications are hosted on different domains.
Eg.
WebApp: app.product.com
API: api.product.com
Cookies are set in Set-Cookie header in response to API call:
api.product.com/SetCookie -> response header Set-Cookie: cookie_name=cookie_value; path=/; secure; HttpOnly; SameSite=None
Than I'm making request to API again and I need this cookie to be attached to request headers.
Everything works fine on most of popular browsers, but on Safari (version 13.1+) this cookie is not set (it's not visible in dev tools even).
Cookie is visible in response response with cookie
But its not stored in browser cookies enter image description here
I was trying to set domain attribute of cookie to 'product.com' but it didn't resolve problem.
Is there any way to set cross domain cookies in that case? Maybe by changing set cookie attributes.
Or hosting all applications from same domain will solve the problem?