This repository was archived by the owner on May 10, 2021. It is now read-only.
  
  
  
  
  
Description
The Next.js samples for preview mode involve doing a redirection from an api route. The code is something like:
  res.setPreviewData({
    maxAge: 60 * 60 // The preview mode cookies expire in 1 hour
  })
  res.writeHead(307, { Location: `/${req.query.contentType}/${req.query.slug}` })I can do this from next run, but if I try this on Netlify it seems to strip the location header on the 307 redirect. Is this something to do with the compat call or am I doing something wrong?