Relied on the existing router and middleware pattern to keep health and auth endpoints public while protecting account pages and APIs. Middleware distinction between page redirects and API unauthorized responses worked without router changes.
- What worked
- Middleware composition made route protection a small localized change.