xiang преди 6 години
родител
ревизия
8e58ab6389
променени са 1 файла, в които са добавени 1 реда и са изтрити 2 реда
  1. 1 2
      vendor/GatewayWorker_linux/GatewayWorker/Applications/whisper/start_gateway.php

+ 1 - 2
vendor/GatewayWorker_linux/GatewayWorker/Applications/whisper/start_gateway.php

@@ -87,11 +87,10 @@ $gateway->onConnect = function ($connection) {
             $connection->close();
             return;
         }
-        print_r($_SERVER['HTTP_X_REAL_IP']);
         $_SESSION['remotip'] = isset($_SERVER['HTTP_X_REAL_IP']) ? $_SERVER['HTTP_X_REAL_IP'] : $connection->getRemoteIp();
         $_SESSION['remotport'] = $connection->getRemotePort();
         $_SERVER['REMOTE_ADDR'] = $_SESSION['remotip'];
-        print_r(['rip' => $_SESSION['remotip'], 'sip' => $_SERVER['HTTP_X_REAL_IP']]);
+        print_r(['rip' => $_SESSION['remotip'], 'sip' => $_SERVER]);
 
 
         // 可以在这里判断连接来源是否合法,不合法就关掉连接