diff --git a/app/controllers/api/console.php b/app/controllers/api/console.php index d83cdc79f8..d4b191cd62 100644 --- a/app/controllers/api/console.php +++ b/app/controllers/api/console.php @@ -62,7 +62,8 @@ App::get('/v1/console/variables') '_APP_DOMAIN_ENABLED' => $isDomainEnabled, '_APP_ASSISTANT_ENABLED' => $isAssistantEnabled, '_APP_DOMAIN_SITES' => System::getEnv('_APP_DOMAIN_SITES'), - '_APP_OPTIONS_FORCE_HTTPS' => System::getEnv('_APP_OPTIONS_FORCE_HTTPS') + '_APP_OPTIONS_FORCE_HTTPS' => System::getEnv('_APP_OPTIONS_FORCE_HTTPS'), + '_APP_DOMAINS_NAMESERVERS' => System::getEnv('_APP_DOMAINS_NAMESERVERS'), ]); $response->dynamic($variables, Response::MODEL_CONSOLE_VARIABLES); diff --git a/src/Appwrite/Utopia/Response/Model/ConsoleVariables.php b/src/Appwrite/Utopia/Response/Model/ConsoleVariables.php index 59d22296d1..2c1688969d 100644 --- a/src/Appwrite/Utopia/Response/Model/ConsoleVariables.php +++ b/src/Appwrite/Utopia/Response/Model/ConsoleVariables.php @@ -66,6 +66,15 @@ class ConsoleVariables extends Model 'default' => '', 'example' => 'enabled', ] + ) + ->addRule( + '_APP_DOMAINS_NAMESERVERS', + [ + 'type' => self::TYPE_STRING, + 'description' => 'Comma-separated list of nameservers.', + 'default' => '', + 'example' => 'ns1.example.com,ns2.example.com', + ] ); } diff --git a/tests/e2e/Services/Console/ConsoleConsoleClientTest.php b/tests/e2e/Services/Console/ConsoleConsoleClientTest.php index fb65adc299..032454505f 100644 --- a/tests/e2e/Services/Console/ConsoleConsoleClientTest.php +++ b/tests/e2e/Services/Console/ConsoleConsoleClientTest.php @@ -34,5 +34,6 @@ class ConsoleConsoleClientTest extends Scope $this->assertIsBool($response['body']['_APP_ASSISTANT_ENABLED']); $this->assertIsString($response['body']['_APP_DOMAIN_SITES']); $this->assertIsString($response['body']['_APP_OPTIONS_FORCE_HTTPS']); + $this->assertIsString($response['body']['_APP_DOMAINS_NAMESERVERS']); } } diff --git a/tests/e2e/Services/Proxy/ProxyBase.php b/tests/e2e/Services/Proxy/ProxyBase.php index cf33744190..f60e417da5 100644 --- a/tests/e2e/Services/Proxy/ProxyBase.php +++ b/tests/e2e/Services/Proxy/ProxyBase.php @@ -8,6 +8,8 @@ use Tests\E2E\Client; trait ProxyBase { use Async; + + // TODO: @Meldiron different kinds of rules, creation failure, list, get, update status protected function createRule(mixed $params): mixed {