👀 Our most exciting product launch yet 🚀 Join us May 8th for Sanity Connect

CORS error - No access control origin

3 replies
Last updated: Sep 5, 2022
Hi, sorry I'm still having a CORS error (No-access-control-origin header is present) in my local environment that I can't fix, so data isn't being connected from Sanity to my react app. I've updated my images and code, here is a list of 10 images showing errors, code, file directory etc (with a quick description for each). Wasn't entirely sure what to include. Been stuck on this issue for a week now and I have a deadline coming up so super appreciate any help!
Sep 5, 2022, 3:06 PM
Hi Ciar. When you go to sanity.io/manage , select this project, and select the API tab, what do you see under CORS origins?
Sep 5, 2022, 3:41 PM
Or, if you’d prefer not to share it, make sure
<http://localhost:3000>
is there (and not
https
).
Sep 5, 2022, 3:42 PM
Hi Geoff, thanks for responding, that fixed it!
Sep 5, 2022, 4:19 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?