xiang 6 years ago
parent
commit
ac6245f79d

+ 5 - 5
vendor/GatewayWorker_linux/GatewayWorker/Applications/whisper/start_gateway.php

@@ -89,11 +89,11 @@ $gateway->onConnect = function ($connection) {
         }
 
         $_SESSION['remotip'] = isset($_SERVER['HTTP_X_REAL_IP'])  ? $_SERVER['HTTP_X_REAL_IP'] : $connection->getRemoteIp();
-        //从cdn中提取ip
-        $ips = getRealIp($_SERVER['HTTP_X_FORWARDED_FOR']);
-        if ($ips == '') { } else {
-            $_SESSION['remotip'] = $ips;
-        }
+        // //从cdn中提取ip
+        // $ips = getRealIp($_SERVER['HTTP_X_FORWARDED_FOR']);
+        // if ($ips == '') { } else {
+        //     $_SESSION['remotip'] = $ips;
+        // }
         $_SESSION['remotport'] = $connection->getRemotePort();
         $_SERVER['REMOTE_ADDR'] = $_SESSION['remotip'];