minor refactor on generating proxy url