Rewrite the environment in Request