nextjs-starter-prismic-blog icon indicating copy to clipboard operation
nextjs-starter-prismic-blog copied to clipboard

fix: do not cache `/api/exit-preview`

Open angeloashmore opened this issue 3 years ago • 1 comments

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.

angeloashmore avatar Aug 16 '22 00:08 angeloashmore

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)

vercel[bot] avatar Aug 16 '22 00:08 vercel[bot]

@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

angeloashmore avatar Mar 16 '23 01:03 angeloashmore