mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
fix:created a constant for appwrite.network
This commit is contained in:
1 parent
3441903e7e
commit
2be9b50815
3 files changed
+5
-4
No files matched your search
@@ -4,6 +4,7 @@ use Appwrite\Platform\Modules\Compute\Specification;
|
||||
|
||||
const APP_NAME = 'Appwrite';
|
||||
const APP_DOMAIN = 'appwrite.io';
|
||||
const APP_DOMAIN_SITES_SUFFIX = 'appwrite.network'; // Default suffix for Appwrite sites domains
|
||||
const APP_EMAIL_TEAM = 'team@localhost.test'; // Default email address
|
||||
const APP_EMAIL_SECURITY = ''; // Default security email address
|
||||
const APP_EMAIL_LOGO_URL = 'https://cloud.appwrite.io/images/mails/logo.png';
|
||||
|
||||
@@ -20,7 +20,7 @@ class AppwriteDomain extends Validator
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->suffix = System::getEnv('_APP_DOMAIN_SITES', 'appwrite.network');
|
||||
$this->suffix = System::getEnv('_APP_DOMAIN_SITES', APP_DOMAIN_SITES_SUFFIX);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,7 +23,7 @@ class AppwriteDomainTest extends TestCase
|
||||
{
|
||||
// Get the actual configured suffix from environment (in Docker it's sites.localhost)
|
||||
// But test both the environment value and the default value
|
||||
$envSuffix = \Utopia\System\System::getEnv('_APP_DOMAIN_SITES', 'appwrite.network');
|
||||
$envSuffix = \Utopia\System\System::getEnv('_APP_DOMAIN_SITES', APP_DOMAIN_SITES_SUFFIX);
|
||||
|
||||
// Valid one-level subdomains with environment suffix
|
||||
$this->assertEquals(true, $this->validator->isValid('api.' . $envSuffix));
|
||||
@@ -138,8 +138,8 @@ class AppwriteDomainTest extends TestCase
|
||||
$description = $this->validator->getDescription();
|
||||
$this->assertIsString($description);
|
||||
|
||||
// Get the environment suffix to check it's in the description
|
||||
$envSuffix = \Utopia\System\System::getEnv('_APP_DOMAIN_SITES', 'appwrite.network');
|
||||
// Get the environment suffix to check it's in the description
|
||||
$envSuffix = \Utopia\System\System::getEnv('_APP_DOMAIN_SITES', APP_DOMAIN_SITES_SUFFIX);
|
||||
$this->assertStringContainsString($envSuffix, $description);
|
||||
$this->assertStringContainsString('one-level subdomain', $description);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user