added checking for heroku X-Forwarded-For header