v3 embed in Astro getting CORS issues #3981
Unanswered
Snugug
asked this question in
Sanity Studio Support
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm attempting to embed v3 into an Astro project (brand new project from Astro init) with the following in a
admin.astro
page:This will properly pull in Sanity, but I get
Unknown network error attempting to reach snow-dog.api.sanity.io
. Looking in my console, it's a CORS issue (Access to XMLHttpRequest at 'https://{project}.api.sanity.io/v2021-06-07/users/me?tag=sanity.studio.users.get-current' from origin 'http://localhost:3333' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
)I've got CORS set up correctly in my project (see below)
Is there something else that needs to be done to get this to work?
Beta Was this translation helpful? Give feedback.
All reactions