Fork me on GitHub

Using reitit you can specify middlewares anywhere in your routing data structure. I thought I had a good example on hand, but I think that’s on my work repo. Here are a couple pointers to examples of how they use middlewares flexibly: • shows how they do a stack of global middlewares. • they show a middleware layered on at each location in a path. While it’s a cool example it did leave me a little confused the first time I saw it. Like jumping from concept to grad school in one step. You can basically add middleware at any endpoint (or in the middle) of your routing table with reitit. The guys said they do Compojure so they can probably post the equivalent.