UNPKG
@nadeshikon/plugin-nextjs
Version:
latest (4.29.5-4)
4.29.5
4.29.5-4
4.29.5-3
4.29.5-2
4.29.5-1
Run Next.js seamlessly on Netlify
github.com/netlify/next-runtime
netlify/next-runtime
@nadeshikon/plugin-nextjs
/
demos
/
default
/
pages
/
api
/
exitPreview.js
9 lines
(7 loc)
•
259 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
export
default
async
function
exit
(
_, res
) {
// Exit the current user from "Preview Mode". This function accepts no args.
res.
clearPreviewData
()
// Redirect the user back to the index page.
res.
writeHead
(
307
, {
Location
:
'/'
}) res.
end
() }