Fix get.php key loading fallback
This commit is contained in:
@@ -32,8 +32,9 @@ try {
|
|||||||
// 2. طلب بيانات السائقين من سيرفر اللوكيشن (Redis API)
|
// 2. طلب بيانات السائقين من سيرفر اللوكيشن (Redis API)
|
||||||
// — يرجع cache hits لو موجودة، وإلا يرجع IDs فقط
|
// — يرجع cache hits لو موجودة، وإلا يرجع IDs فقط
|
||||||
// ==========================================
|
// ==========================================
|
||||||
$locationServerUrl = getenv('LOCATION_API_URL');
|
$locationServerUrl = getenv('LOCATION_API_URL') ?: 'http://nginx/loction_server/api_get_nearby.php';
|
||||||
$INTERNAL_KEY = trim(file_get_contents(getenv('INTERNAL_SOCKET_KEY_PATH')));
|
$keyPath = getenv('INTERNAL_SOCKET_KEY_PATH') ?: '/keys/.internal_socket_key';
|
||||||
|
$INTERNAL_KEY = getenv('INTERNAL_SOCKET_KEY') ?: (file_exists($keyPath) ? trim((string)@file_get_contents($keyPath)) : (file_exists('/home/location/.internal_socket_key') ? trim((string)@file_get_contents('/home/location/.internal_socket_key')) : ''));
|
||||||
|
|
||||||
$ch = curl_init();
|
$ch = curl_init();
|
||||||
curl_setopt($ch, CURLOPT_URL, $locationServerUrl);
|
curl_setopt($ch, CURLOPT_URL, $locationServerUrl);
|
||||||
|
|||||||
Reference in New Issue
Block a user