Get a peek at our latest innovations at Sanity Product Day on Dec 8th →

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 , 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

is there (and not

Sep 5, 2022, 3:42 PM

Hi Geoff, thanks for responding, that fixed it!

Sep 5, 2022, 4:19 PM Get the most out of your content is a platform to build websites and applications. It comes with great APIs that let you treat content like data. Free to get started, and pay-as-you-go on all plans. Find out more.