1
0
Fork 0
mirror of synced 2024-06-29 11:40:45 +12:00
appwrite/app/config/runtimes.php
2021-04-21 13:27:02 +02:00

19 lines
485 B
PHP

<?php
use Utopia\App;
use Appwrite\Runtimes\Runtimes;
/**
* List of Appwrite Cloud Functions supported runtimes
*/
$runtimes = Runtimes::get();
$allowList = empty(App::getEnv('_APP_FUNCTIONS_ENVS')) ? false : \explode(',', App::getEnv('_APP_FUNCTIONS_ENVS'));
$runtimes = array_filter($runtimes, function ($key) use ($allowList) {
$isAllowed = $allowList && in_array($key, $allowList);
return $allowList ? $isAllowed : true;
}, ARRAY_FILTER_USE_BOTH);
return $runtimes;