Refactor logic in middleware into separate classes
We should only be replacing the token in body of response in range 2XX