Honor X-Forwarded-For of HTTP clients not only in web.

Fix #537