top | item 45100658

(no title)

rozumbrada | 6 months ago

If you finally decided to support proper server-side middleware, why is there still a limitation for only one middleware function and not a chain of middleewares as every other sane server implementation offers?

discuss

order

bestest|6 months ago

Consider middleware.ts as a root middleware. Nothing is stopping you from creating your own chain (which is trivial) in there. I mean, that would eventually work the same if nextjs implemented that feature — there would be a root somewhere.

rs186|6 months ago

That doesn't answer parent's question.

People expect "middleware" to mean a certain thing and work a certain way.