Added basic support for X-Forwarded-For. Will need improving upon