added middleware to test configs