Open th-km opened 9 months ago
Also getting this with the Presentation Tool and live preview after following your guide here: https://www.sanity.io/guides/nextjs-live-preview
Works locally. Does not work in production when deployed to sanity.studio
.
Completely breaks the experience as updates are not streamed to the preview as you update, defeating the purpose of the entire plugin.
+1
+1
+1
Describe the bug
In production, when I open the preview pane, I get a CORS error related to the comment API.
This issue occurs only when the preview pane is open, preventing me from editing fields and causing the studio to crash.
Access to XMLHttpRequest at 'https://api.sanity.io/v2023-12-11/journey/comments?tag=sanity.studio' from origin 'xxx' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
It works fine in local development and when previewing on another tab.
Which versions of Sanity are you using?
sanity 3.31.0
andsanity-plugin-iframe-pane 3.1.3
What operating system are you using?
macOS 12.6
Which versions of Node.js / npm are you running?
node v20.11.1
Additional context
I'm not sure if this is related to
preview-kit
,sanity-plugin-iframe-pane
or Sanity itself, since it's related to the comment API.