accept mixed middleware or middleware array

I don't know if you agree on mixed parameter signature in the API.
Just in case here is a PR in order to accept a single middleware.