Refactor request proxy