aryzing
aryzing9mo ago

Can middleware be used on a router?

Given a router where all procedures need to use the same middleware, can the middleware be somehow attached to the router instead of manually to routes? For example, given an "admin" router, it would be quite catastrophic if one of the endpoints was accidentally set up with a publicProcedure instead of adminProcedure = publicProcedure.use(isAdmin).
Solution:
no, it’s not possible
Jump to solution
1 Reply
Solution
sachin
sachin9mo ago
no, it’s not possible