add middleware [ci skip]