From 3ec2478daf30b4641aa1e16511eecc94b65e1628 Mon Sep 17 00:00:00 2001 From: Hemachandar Date: Tue, 17 Feb 2026 14:23:14 +0530 Subject: [PATCH] feedback --- .../Platform/Modules/Console/Http/Variables/Get.php | 5 +++-- src/Appwrite/Platform/Tasks/Doctor.php | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Console/Http/Variables/Get.php b/src/Appwrite/Platform/Modules/Console/Http/Variables/Get.php index af83a3efd3..40b3692ad9 100644 --- a/src/Appwrite/Platform/Modules/Console/Http/Variables/Get.php +++ b/src/Appwrite/Platform/Modules/Console/Http/Variables/Get.php @@ -56,7 +56,8 @@ class Get extends Action $isCNAMEValid = !empty(System::getEnv('_APP_DOMAIN_TARGET_CNAME', '')) && $validator->isKnown() && !$validator->isTest(); $validator = new IP(IP::V4); - $isAValid = !empty(System::getEnv('_APP_DOMAIN_TARGET_A', '')) && ($validator->isValid(System::getEnv('_APP_DOMAIN_TARGET_A'))); + $targetA = \explode(',', System::getEnv('_APP_DOMAIN_TARGET_A', ''))[0]; + $isAValid = !empty($targetA) && ($validator->isValid($targetA)); $validator = new IP(IP::V6); $isAAAAValid = !empty(System::getEnv('_APP_DOMAIN_TARGET_AAAA', '')) && $validator->isValid(System::getEnv('_APP_DOMAIN_TARGET_AAAA')); @@ -74,7 +75,7 @@ class Get extends Action $variables = new Document([ '_APP_DOMAIN_TARGET_CNAME' => System::getEnv('_APP_DOMAIN_TARGET_CNAME'), '_APP_DOMAIN_TARGET_AAAA' => System::getEnv('_APP_DOMAIN_TARGET_AAAA'), - '_APP_DOMAIN_TARGET_A' => System::getEnv('_APP_DOMAIN_TARGET_A'), + '_APP_DOMAIN_TARGET_A' => $targetA, '_APP_DOMAIN_TARGET_CAA' => '0 issue "' . System::getEnv('_APP_DOMAIN_TARGET_CAA') . '"', '_APP_STORAGE_LIMIT' => +System::getEnv('_APP_STORAGE_LIMIT'), '_APP_COMPUTE_BUILD_TIMEOUT' => +System::getEnv('_APP_COMPUTE_BUILD_TIMEOUT'), diff --git a/src/Appwrite/Platform/Tasks/Doctor.php b/src/Appwrite/Platform/Tasks/Doctor.php index 8ac1e1121b..9a9c2fdf73 100644 --- a/src/Appwrite/Platform/Tasks/Doctor.php +++ b/src/Appwrite/Platform/Tasks/Doctor.php @@ -63,10 +63,11 @@ class Doctor extends Action } $ipv4 = new IP(IP::V4); - if (!$ipv4->isValid(System::getEnv('_APP_DOMAIN_TARGET_A'))) { - Console::log('🔴 A record target is not valid (' . System::getEnv('_APP_DOMAIN_TARGET_A') . ')'); + $targetA = \explode(',', System::getEnv('_APP_DOMAIN_TARGET_A', ''))[0]; + if (!$ipv4->isValid($targetA)) { + Console::log('🔴 A record target is not valid (' . $targetA . ')'); } else { - Console::log('🟢 A record target is valid (' . System::getEnv('_APP_DOMAIN_TARGET_A') . ')'); + Console::log('🟢 A record target is valid (' . $targetA . ')'); } $ipv6 = new IP(IP::V6);