Hi all, we've recently bumped our Next.JS package to 12.2, and we have some Next.JS middleware used for A/B testing in place on the site. When testing locally in development mode, preview links work fine when used from the dashboard. When using the production build however, the links flicker to the content to preview, and then 404 a second later.
Removing the middleware seems to resolve this issue, although even having the middleware return NextResponse.next() still seems to throw the same error. Cookies seem to be empty on the outgoing response, so this may be partially the issue however cloning request cookies to the response doesn't seem to help either.