|
@@ -91,7 +91,8 @@ $gateway->onConnect = function ($connection) {
|
|
|
$_SESSION['remotport'] = $connection->getRemotePort();
|
|
$_SESSION['remotport'] = $connection->getRemotePort();
|
|
|
//cdn处理
|
|
//cdn处理
|
|
|
$ips = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);
|
|
$ips = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);
|
|
|
- if (isset($ips[0]) && $ips[0]) { } else {
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if (isset($ips[0]) && $ips[0]) {
|
|
|
$_SESSION['remotip'] = $ips[0];
|
|
$_SESSION['remotip'] = $ips[0];
|
|
|
}
|
|
}
|
|
|
//cdn处理
|
|
//cdn处理
|