Files
Janka UrygaandGitHub b3d9b15d82 [after] fix waitUntil in edge runtime sandbox (pages/api) (#71309)
Fixes an issue where using `after` in a `runtime = "edge"` page would
throw an error saying that `waitUntil` is missing. This was because we
weren't correctly passing `waitUntil` into the edge runtime sandbox.

(More precisely, the WebServer we run for those app-page/app-route
handlers wasn't receiving `waitUntil` -- middleware goes through a
different codepath and thus was fine)

This PR (ab)uses the `"@next/request-context"` global ALS (intended for
platforms to provide `waitUntil` to Next.js) to fix this -- it works
because the wrapped WebServer will read `"@next/request-context"` and
thus use the correct `waitUntil`.
2024-10-15 20:21:51 +02:00
..