Skip to content

Topics

Jump to a topic.

Search questions

Find a question by title, tag, or summary.

Chapter 07

Route handlers, Proxy and request hooks

Request-level code in Next.js: route.ts handlers, proxy.ts and why it replaced middleware, why Proxy is not an authorization layer, after for work that runs after the response, and instrumentation.ts for request errors.
  1. 010When do you write a route handler instead of a Server Action?medium
  2. 020What is proxy.ts, what should run there, and why was middleware renamed?medium
  3. 030Why is Proxy not enough for authorization?hard
  4. 040What does after run, and when does it run relative to the response?medium
  5. 050What do instrumentation.ts and onRequestError hook into?medium