next.js
662918f9 - [Cache Components] Disallow sync access of cookies & headers at runtime (#82564)

Commit
134 days ago
[Cache Components] Disallow sync access of cookies & headers at runtime (#82564) In #81162 we removed the support for accessing request data synchronously when `experimental.cacheComponents` is enabled. However, we missed updating the `cookies()` and `headers()` promises that are created at runtime to not be "exotic" promises, i.e. promises that also have the cookies/headers methods defined on them. Those two cases are now updated as well with this PR. (Params, search params, and draft mode were already handled correctly in the original PR.) In the next major version we'll remove the support for the legacy synchronous access independent of the `cacheComponents` flag.
Author
Parents
Loading