My react app (from domain react-app.com) is loaded inside a website beautiful-site.com and the requests sending from react app doesn't sending the session cookie associated with it.
The workaround I had was added the below header in server and in react app XHR requests sent with withCredentials: true
Access-Control-Allow-Origin: https://beautiful-site.com
Access-Control-Allow-Credentials: true
The issue is I can specify a particular site in Access-Control-Allow-Origin
, because the react app will be added to many sites not one.
Is there any way to get the session cookie send from react app?