1
0
Fork 0
mirror of synced 2024-09-29 08:51:28 +13:00
appwrite/app/config/runtimes.php
2021-04-22 11:26:10 +02:00

19 lines
No EOL
494 B
PHP

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