diff --git a/app/controllers/api/proxy.php b/app/controllers/api/proxy.php index 7f063bd495..514b21fe47 100644 --- a/app/controllers/api/proxy.php +++ b/app/controllers/api/proxy.php @@ -61,8 +61,11 @@ App::post('/v1/proxy/rules') throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'You cannot assign your main domain to specific resource. Please use subdomain or a different domain.'); } - $deniedDomains = System::getEnv('_APP_CUSTOM_DOMAIN_DENY_LIST', ''); + $denyListString = System::getEnv('_APP_CUSTOM_DOMAIN_DENY_LIST', ''); + $deniedDomains = array_map('trim', explode(',', $denyListString)); + var_dump($deniedDomains); foreach ($deniedDomains as $deniedDomain) { + var_dump(str_ends_with($domain, $deniedDomain)); if (str_ends_with($domain, $deniedDomain)) { throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'You cannot assign your functions domain or its subdomain to a specific resource. Please use a different domain.'); }