Add source middleware.