Hi, I'm on app development which is for shopify app stores.
My app installs scripttag into merchants's store and create cookie with store's information.
When send request from scripttag to my app server, I get CORS Problem in browser console (image below)
When I use below option when send request, error message disappears
And I lost cookie data either.
also can't really use the way to allowing origins because I'll provide the app to one or more stores
Is there way to get cookie data with "credentials: true" and no error messages on console
Can you try sending your request and omit the
withCredentials directive? If that doesn't work, can you clarify which cookie you are trying to access?
when I try to omit the directive(withCredentials:false) it don't send the request with cookie value.
according to this link https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
I have to set allow-origin in my app server and it worked. but I don't really think I can set all the origins of stores which are using my app
The cookie I'm trying to access is to track which pages customers have visited.
for example, customer went to the product page through certain collection page. our app tracks which collection page customer pass through
we save the page information(url, collection title etc ..) in cookie then extract it in product page to send request to the app.
If you have any idea please let me know, I'm still working on it to solve cookie problem