next.js
d00ad51a - fix(after): no request APIs in force-static (#73321)

Commit
1 year ago
fix(after): no request APIs in force-static (#73321) Fixes a bug where `after(() => headers())` was allowed if `force-static` was on (and `cookies()` + `connection()` too). We shouldn't allow that, because it essentially just hides an error -- if the page is switched to dynamic, the same code would now start erroring. *(Note that this is still without the upcoming changes to `headers()` in `after`, so the behavior in route handlers will change. i discovered this bug while working on that update, but it was confusing to try and change both at the same time, so i pulled it out into a separate PR)*
Author
Parents
Loading