diff --git a/app/controllers/general.php b/app/controllers/general.php index 4bf0203abd..f2362544c6 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -12,10 +12,7 @@ use Appwrite\Event\StatsUsage; use Appwrite\Extend\Exception as AppwriteException; use Appwrite\Network\Validator\Origin; use Appwrite\Platform\Appwrite; -use Appwrite\SDK\AuthType; -use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; -use Appwrite\SDK\Response as SDKResponse; use Appwrite\Transformation\Adapter\Preview; use Appwrite\Transformation\Transformation; use Appwrite\Utopia\Request; @@ -185,6 +182,11 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw default => null }; + // Static site enforced runtime + if ($resource->getAttribute('adapter', '') === 'static') { + $runtime = $runtimes['static-1'] ?? null; + } + if (\is_null($runtime)) { throw new AppwriteException(AppwriteException::FUNCTION_RUNTIME_UNSUPPORTED, 'Runtime "' . $resource->getAttribute('runtime', '') . '" is not supported'); }