nextjs-starter-prismic-blog
nextjs-starter-prismic-blog copied to clipboard
fix: do not cache `/api/exit-preview`
Types of changes
- [ ] Chore (a non-breaking change which is related to starter maintenance)
- [x] Bug fix (a non-breaking change which fixes an issue)
- [ ] New feature (a non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
Description
This PR ensures /api/exit-preview is not cached.
Before this PR, previews could not be exited unless caching was disabled in the browser (not the default).
Checklist:
- [ ] My change requires an update to the official documentation.
- [ ] All TSDoc comments are up-to-date and new ones have been added where necessary.
- [ ] All new and existing tests are passing.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Updated |
|---|---|---|---|
| nextjs-starter-prismic-blog | ✅ Ready (Inspect) | Visit Preview | Aug 16, 2022 at 1:22AM (UTC) |
@prismicio/next has since been updated to do what this PR implements.
See @prismicio/next's exitPreview() source here for details: https://github.com/prismicio/prismic-next/blob/cc825bd8ca36b4215880d61c7774ca9c10552f4b/src/exitPreview.ts#L43-L50