Routing middleware for coju