Fork me on GitHub
#reitit
<
2022-12-19
>
robert-stuttaford10:12:06

does anyone have a working reitit + interceptors + ring-cookie + ring-session example, please? 😄

robert-stuttaford10:12:37

question: can i use middlewares and interceptors at the same time?

ikitommi15:12:54

Hmm, you could, but I don't think you should, and not supported by default. If you really need this - use interceptors as the chaining engine and wrap all mw into interceptors: inspect the chain (there is a hook to do that in reitit) and use some generic converter. Or wrap each mw manually.

ikitommi15:12:43

doesn't work the other way around, e.g. can't convert interceptors into mw, as they can manipulate the queue - mw chains are always static (and because of that, faster)

robert-stuttaford15:12:14

ok thank you - this was more of a 'robert wants to understand the system' question, than an actual intent 😄