Fork me on GitHub
#reitit
<
2019-04-13
>
haiyuan.vinurs13:04:38

does reitit can modify a middleware dynamically?

ikitommi15:04:09

@haiyuan.vinurs depends on how dynamically. The middleware chain (and the middleware) can be modified at router creation. At request-time, the chain is compiled and thus static. The mw can still do whatever, based on endpoint & request.

haiyuan.vinurs15:04:43

does the arguments for middleware are static at compile time

haiyuan.vinurs15:04:21

so the argument for middleware can not changed at run time?

ikitommi16:04:03

They can't. Recreating the router is the only way to reset the mw arguments.