diff --git a/backend/core/bootstrap.php b/backend/core/bootstrap.php index 0d798ca..e7ab601 100644 --- a/backend/core/bootstrap.php +++ b/backend/core/bootstrap.php @@ -43,7 +43,7 @@ header("X-XSS-Protection: 1; mode=block"); // CORS مع التحقق من المصدر المسموح $envOrigins = array_map('trim', explode(',', getenv('CORS_ALLOWED_ORIGINS') ?: '')); -$defaultOrigins = ['https://siromove.com', 'https://admin.siromove.com', 'https://jordan-siro.intaleqapp.com', 'http://localhost', 'http://127.0.0.1']; +$defaultOrigins = ['https://siromove.com', 'https://admin.siromove.com', 'https://api.intaleqapp.com', 'http://localhost', 'http://127.0.0.1']; $allowedOrigins = array_unique(array_merge($envOrigins, $defaultOrigins)); $origin = $_SERVER['HTTP_ORIGIN'] ?? ''; if (in_array($origin, $allowedOrigins)) { diff --git a/backend/loginAdmin.php b/backend/loginAdmin.php index edf11a7..4a7c2b0 100644 --- a/backend/loginAdmin.php +++ b/backend/loginAdmin.php @@ -9,7 +9,7 @@ header('Content-Type: application/json'); // ✅ FIX H-03: allowlist صارم للـ Admin Origins $allowedOrigins = array_filter([ getenv('ALLOWED_ORIGIN') ?: 'https://siromove.com', - 'https://jordan-siro.intaleqapp.com', + 'https://api.intaleqapp.com', 'http://localhost', 'http://127.0.0.1', ]); diff --git a/backend/ride/location/get.php b/backend/ride/location/get.php index b5288d5..268b9c9 100644 --- a/backend/ride/location/get.php +++ b/backend/ride/location/get.php @@ -32,7 +32,7 @@ try { // 2. طلب بيانات السائقين من سيرفر اللوكيشن (Redis API) // — يرجع cache hits لو موجودة، وإلا يرجع IDs فقط // ========================================== - $locationServerUrl = getenv('LOCATION_API_URL') ?: 'https://jordan-siro.intaleqapp.com/loction_server/api_get_nearby.php'; + $locationServerUrl = getenv('LOCATION_API_URL') ?: 'https://api.intaleqapp.com/loction_server/api_get_nearby.php'; $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(__DIR__ . '/../../../loction-keys/.internal_socket_key') ? trim((string)@file_get_contents(__DIR__ . '/../../../loction-keys/.internal_socket_key')) : (file_exists('/home/location/.internal_socket_key') ? trim((string)@file_get_contents('/home/location/.internal_socket_key')) : '')));