Fix authorization middleware being applied outside the routing layer.