Earlier quoted context omitted.
That doesn't answer parent's question. People expect "middleware" to mean a certain thing and work a certain way.
middleware = fn(req) → next(req). express/koa give you the use() chain. next.js gives you one root, but nothing stops you from chaining yourself. same semantics, just manual wiring. type mw = (req: Request, next: () => Response) => Response; const logger: mw = (req, next) => { console.log(req.url); return next(); }; const auth: mw = (req, next) => { if (!req.headers.get("x-auth")) return new Response("forbidden", { s…
I expect these things to be standardized by the framework and all the sharp edges filed off - thats why I go to a framework in the first place.