add response-size middleware