adding HTTP_X_FORWARDED_FOR support