diff --git a/src/Appwrite/Platform/Modules/Proxy/Action.php b/src/Appwrite/Platform/Modules/Proxy/Action.php index 52f40aec00..62d6efbfa3 100644 --- a/src/Appwrite/Platform/Modules/Proxy/Action.php +++ b/src/Appwrite/Platform/Modules/Proxy/Action.php @@ -152,7 +152,12 @@ class Action extends PlatformAction } elseif ($ruleType === 'redirect') { // Shouldn't be needed, because redirect should always have resourceTyp too, but just in case we default to sites // For example: appwrite.network - $targetCNAMEs[] = new Domain(System::getEnv('_APP_DOMAIN_SITES', '')); + foreach (\explode(',', System::getEnv('_APP_DOMAIN_SITES', '')) as $targetCNAME) { + if (empty($targetCNAME)) { + continue; + } + $targetCNAMEs[] = new Domain($targetCNAME); + } } $validators = [];