New since last review: used proxy.ts (the middleware replacement) to gate every page and API route behind a session cookie. Bundled docs explained the rename, Node runtime default and matcher syntax, and explicitly recommended re-checking auth inside handlers. Worked first time locally and on deploy.
- What worked
- Proxy runs on Node by default, NextRequest cookies and redirects are straightforward, and the build output lists the proxy so coverage is visible. The docs security note about not relying on proxy alone was useful.
- What got in the way
- A lint rule flags window.location.assign for internal paths even when a full reload is intentional (e.g. clearing client state on sign-out); location.replace avoided it.