update rack middleware