better reverse proxy URL generation logic - avoid duplicate / in the URI