Compare commits

...
4 changed files with 48 additions and 36 deletions
+2
View File
@@ -22,6 +22,8 @@ _APP_OPTIONS_FORCE_HTTPS=disabled
_APP_OPTIONS_ROUTER_FORCE_HTTPS=disabled
_APP_OPENSSL_KEY_V1=your-secret-key
_APP_DOMAIN=traefik
_APP_STRIPE_PUBLISHABLE_KEY=
_APP_SUPPORTS_MULTI_REGION=false
_APP_DOMAIN_FUNCTIONS=functions.localhost
_APP_DOMAIN_SITES=sites.localhost
_APP_DOMAIN_TARGET_CNAME=test.localhost
+2
View File
@@ -81,6 +81,8 @@ App::get('/v1/console/variables')
'_APP_DOMAIN_FUNCTIONS' => System::getEnv('_APP_DOMAIN_FUNCTIONS'),
'_APP_OPTIONS_FORCE_HTTPS' => System::getEnv('_APP_OPTIONS_FORCE_HTTPS'),
'_APP_DOMAINS_NAMESERVERS' => System::getEnv('_APP_DOMAINS_NAMESERVERS'),
'_APP_SUPPORTS_MULTI_REGION' => System::getEnv('_APP_SUPPORTS_MULTI_REGION'),
'_APP_STRIPE_PUBLISHABLE_KEY' => System::getEnv('_APP_STRIPE_PUBLISHABLE_KEY')
]);
$response->dynamic($variables, Response::MODEL_CONSOLE_VARIABLES);
+2
View File
@@ -119,6 +119,8 @@ services:
- _APP_DOMAIN_TARGET_CNAME
- _APP_DOMAIN_TARGET_AAAA
- _APP_DOMAIN_TARGET_A
- _APP_STRIPE_PUBLISHABLE_KEY
- _APP_SUPPORTS_MULTI_REGION
- _APP_DOMAIN_FUNCTIONS
- _APP_REDIS_HOST
- _APP_REDIS_PORT
@@ -10,24 +10,24 @@ class ConsoleVariables extends Model
public function __construct()
{
$this
->addRule('_APP_DOMAIN_TARGET_CNAME', [
'type' => self::TYPE_STRING,
'description' => 'CNAME target for your Appwrite custom domains.',
'default' => '',
'example' => 'appwrite.io',
])
->addRule('_APP_DOMAIN_TARGET_A', [
'type' => self::TYPE_STRING,
'description' => 'A target for your Appwrite custom domains.',
'default' => '',
'example' => '127.0.0.1',
])
->addRule('_APP_DOMAIN_TARGET_AAAA', [
'type' => self::TYPE_STRING,
'description' => 'AAAA target for your Appwrite custom domains.',
'default' => '',
'example' => '::1',
])
->addRule('_APP_DOMAIN_TARGET_CNAME', [
'type' => self::TYPE_STRING,
'description' => 'CNAME target for your Appwrite custom domains.',
'default' => '',
'example' => 'appwrite.io',
])
->addRule('_APP_DOMAIN_TARGET_A', [
'type' => self::TYPE_STRING,
'description' => 'A target for your Appwrite custom domains.',
'default' => '',
'example' => '127.0.0.1',
])
->addRule('_APP_DOMAIN_TARGET_AAAA', [
'type' => self::TYPE_STRING,
'description' => 'AAAA target for your Appwrite custom domains.',
'default' => '',
'example' => '::1',
])
->addRule('_APP_STORAGE_LIMIT', [
'type' => self::TYPE_INTEGER,
'description' => 'Maximum file size allowed for file upload in bytes.',
@@ -76,24 +76,30 @@ class ConsoleVariables extends Model
'default' => '',
'example' => 'functions.localhost',
])
->addRule(
'_APP_OPTIONS_FORCE_HTTPS',
[
'type' => self::TYPE_STRING,
'description' => 'Defines if HTTPS is enforced for all requests.',
'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',
]
);
->addRule('_APP_OPTIONS_FORCE_HTTPS', [
'type' => self::TYPE_STRING,
'description' => 'Defines if HTTPS is enforced for all requests.',
'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',
])
->addRule('_APP_SUPPORTS_MULTI_REGION', [
'type' => self::TYPE_BOOLEAN,
'description' => 'Defines if multi-region is supported.',
'default' => false,
'example' => true,
])
->addRule('_APP_STRIPE_PUBLISHABLE_KEY', [
'type' => self::TYPE_BOOLEAN,
'description' => 'Defines stripe live/test key.',
'default' => '',
'example' => 'sk_test_51ABC1234567890abcdef1234567890abcdef1234567890abcdef123456',
]);
}
/**