Fix problem if behind a proxy

if behind a proxy, the proxy ip is shown to the downloadable tar gz. This PR will fix that issue
test: respect x-forwarded-for