Add middleware documentation