ClozeDifficulty 1
Request interception before a route renders can be done in middleware.ts at the project root (or src/).
Answer
middleware.ts
middleware runs on the edge of the request path before matching pages and route handlers.
middleware.ts
middleware runs on the edge of the request path before matching pages and route handlers.