code: private static function parseRemoteHost(Request &$request, $serverVars = array())
      {
          if (isset($serverVars['REMOTE_ADDR'])) {
              $request->remoteHost = $serverVars['REMOTE_ADDR'];
          }
          if (isset($serverVars['HTTP_X_FORWARDED_FOR'])) {
              $request->remoteHost = $serverVars['HTTP_X_FORWARDED_FOR'];
          }
      }
docs: Parse the remote host variables to determine client address
  
  @param Request $request