mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
As updated in https://github.com/vercel/next.js/pull/38313 this ensures the `path` option can also be passed to `clearPreviewData` to properly clear the preview cookies. ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` Fixes: https://github.com/vercel/next.js/issues/39853
11 lines
186 B
JavaScript
11 lines
186 B
JavaScript
export default (req, res) => {
|
|
res.clearPreviewData(
|
|
req.query.cookiePath
|
|
? {
|
|
path: req.query.cookiePath,
|
|
}
|
|
: undefined
|
|
)
|
|
res.status(200).end()
|
|
}
|