ndimatteo / HULL

💀 Headless Shopify Starter – powered by Next.js + Sanity.io
https://hull.dev
MIT License
1.36k stars 167 forks source link

Vercel deploy with custom domain does not load inventory #111

Closed markverbeek-amsterdam closed 1 year ago

markverbeek-amsterdam commented 1 year ago

The Vercel deploy works fine on the Vercel.app domain. However, if I use a custom (.amsterdam) domain, everything works except the inventory update. The buttons show 'Loading' and you cannot add items to the cart. The Vercel function logs show this:

Screenshot 2022-11-27 at 19 02 11

When I use the Vercel.app url the logs only show 200 statuses, no 304

ndimatteo commented 1 year ago

Hey there @markverbeek-amsterdam!

Did you make sure the API CORS access on Sanity includes the new domain you've added? You'll need to make sure you've added the new domain there, and ensure the Shopify Webhooks use the new domain as well.

markverbeek-amsterdam commented 1 year ago

I did and now it works, I should have thought of this myself, apologies and thank you so much for your help!