diff --git a/app/init/resources.php b/app/init/resources.php index 180e256870..e96432ad70 100644 --- a/app/init/resources.php +++ b/app/init/resources.php @@ -901,7 +901,7 @@ App::setResource('resourceToken', function ($project, $dbForProject, $request) { $tokenJWT = $request->getParam('token'); if (!empty($tokenJWT) && !$project->isEmpty()) { // JWT authentication - $jwt = new JWT(App::getEnv('_APP_OPENSSL_KEY_V1'), 'HS256', 900, 10); // Instantiate with key, algo, maxAge and leeway. + $jwt = new JWT(System::getEnv('_APP_OPENSSL_KEY_V1'), 'HS256', 900, 10); // Instantiate with key, algo, maxAge and leeway. try { $payload = $jwt->decode($tokenJWT); diff --git a/tests/e2e/Services/Proxy/ProxyCustomServerTest.php b/tests/e2e/Services/Proxy/ProxyCustomServerTest.php index 3f7099e703..988223bd7a 100644 --- a/tests/e2e/Services/Proxy/ProxyCustomServerTest.php +++ b/tests/e2e/Services/Proxy/ProxyCustomServerTest.php @@ -8,6 +8,7 @@ use Tests\E2E\Scopes\Scope; use Tests\E2E\Scopes\SideServer; use Utopia\App; use Utopia\Database\Query; +use Utopia\System\System; class ProxyCustomServerTest extends Scope { @@ -328,7 +329,7 @@ class ProxyCustomServerTest extends Scope public function testUpdateRule(): void { // Create function appwrite-network domain - $domain = \uniqid() . '-cname-api.' . App::getEnv('_APP_DOMAIN_FUNCTIONS'); + $domain = \uniqid() . '-cname-api.' . System::getEnv('_APP_DOMAIN_FUNCTIONS'); $rule = $this->createAPIRule($domain); $this->assertEquals(201, $rule['headers']['status-code']); @@ -337,7 +338,7 @@ class ProxyCustomServerTest extends Scope $this->cleanupRule($rule['body']['$id']); // Create site appwrite-network domain - $domain = \uniqid() . '-cname-api.' . App::getEnv('_APP_DOMAIN_SITES'); + $domain = \uniqid() . '-cname-api.' . System::getEnv('_APP_DOMAIN_SITES'); $rule = $this->createAPIRule($domain); $this->assertEquals(201, $rule['headers']['status-code']);