Sorry for reposting it both here and Github, but it's a pretty high priority:
Edit: I just tested it locally and I can confirm that this is only a problem on Production (hosted on Vercel)
Sorry for reposting it both here and Github, but it's a pretty high priority:
Edit: I just tested it locally and I can confirm that this is only a problem on Production (hosted on Vercel)
Hello @kris, Could you share with us any screen recordings or error logs?
This helps us better understand the error.
Thank you
@Pau There are no error logs
What is the expected behaviour?
I click exit preview, the toolbar disappears and the preview data is gone as well (so you see production data instead)
Angelo responded to the GitHub issue:
There was a bug in
@prismicio/next
that caused this exact issue when deploying to CDNs that aggressively cache API route responses, including Vercel. This is fixed as ofv0.1.4
where
exitPreview()
now returns a 205 status code.For more details on the issue and the fix, see #32.
I see you're using at least
v0.1.5
, which already includes the fix, so you may have a cached response stored in your browser. Could you clear your browser cache (specifically for the/api/exit-preview
route) and try again? You should see a 205 status code on the/api/exit-preview
route, not a 200.Please let me know if this fixes the issue. Thanks!