πŸ‘€ Our most exciting product launch yet πŸš€ Join us May 8th for Sanity Connect

How to fix CORS errors when running Sanity Studio in a Next.js project.

5 replies
Last updated: Aug 27, 2023
Hi , i have install sanity into my next js project but when i run studio it display following errors
Aug 27, 2023, 1:53 PM
1. Go to your sanity dashboard on https://sanity.io/manage
Aug 27, 2023, 2:06 PM
1. Go to https://sanity.io/manage 2. select your project
3. go to API tab
4. scroll to CORS origins section
Aug 27, 2023, 2:08 PM
1. Go to https://sanity.io/manage 2. select your project
3. go to API tab
4. scroll to CORS origins section
Aug 27, 2023, 2:09 PM
1. Go to https://sanity.io/manage 2. select your project
3. go to
API
tab4. scroll to
CORS origins
section5. click on
+ Add CORS Origin
button6. enter
<http://localhost:3000>
, check
Allow credentials
, then hit
Save
button7. Done! refresh your
localhost:3000
Aug 27, 2023, 2:12 PM
Thanks Dear
Aug 27, 2023, 2:23 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?