Make route middleware an actual piece of middleware