Only use HTTP_X_FORWARDED_FOR if NUM_PROXIES > 0 else use REMOTE_ADDR