added middleware config