respect X-Forwarded-Proto when building uris