Replace middleware references with plugin
2.1.2