allow custom middlewares, correct config path