Update: 2026-07-23 20:15:22

This commit is contained in:
Hamza-Ayed
2026-07-23 20:15:22 +03:00
parent c35b350b31
commit 12a1cbc98c
2 changed files with 10 additions and 4 deletions
+6 -1
View File
@@ -37,6 +37,11 @@ function getAllowedSocketUrls(): array {
}
// القيم الافتراضية لو لم تكن موجودة في .env
return [
'http://nginx',
'http://socket_driver',
'http://socket_passenger',
'http://127.0.0.1',
'http://localhost',
'http://location.intaleq.xyz:2021',
'http://location.intaleq.xyz:3031',
'https://location.intaleq.xyz',
@@ -311,7 +316,7 @@ function notifyDriversOnLocationServer($drivers_ids_array, $payload, $rideId = n
* تخاطب السوكيت الموجود محلياً على نفس السيرفر
*/
function notifyPassengerOnRideServer($passenger_id, $payload) {
$url = getenv('RIDE_SOCKET_URL') ?: 'http://nginx/loction_server/passenger_socket.php';
$url = getenv('PASSENGER_SOCKET_INTERNAL_URL') ?: (getenv('RIDE_SOCKET_URL') ?: 'http://socket_passenger:3031');
if (!isAllowedSocketUrl($url)) return null;
$INTERNAL_KEY = function_exists('getInternalSocketKey') ? getInternalSocketKey() : '';