diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a7fc1cf0c6..6fd4e89858 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -303,7 +303,7 @@ jobs: docker compose up -d sleep 30 - - name: Run Projects tests with dev keys in ${{ matrix.tables-mode }} table mode + - name: Run Projects tests with dev keys in dedicated table mode run: | echo "Using project tables" export _APP_DATABASE_SHARED_TABLES= diff --git a/app/init/resources.php b/app/init/resources.php index bb1183bd52..e96432ad70 100644 --- a/app/init/resources.php +++ b/app/init/resources.php @@ -815,7 +815,7 @@ App::setResource('devKey', function (Request $request, Document $project, array // add sdk to key $sdkValidator = new WhiteList($servers, true); - $sdk = $request->getHeader('x-sdk-name', 'UNKNOWN'); + $sdk = \strtolower($request->getHeader('x-sdk-name', 'UNKNOWN')); if ($sdk !== 'UNKNOWN' && $sdkValidator->isValid($sdk)) { $sdks = $key->getAttribute('sdks', []); @@ -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..9a7ba74ec1 100644 --- a/tests/e2e/Services/Proxy/ProxyCustomServerTest.php +++ b/tests/e2e/Services/Proxy/ProxyCustomServerTest.php @@ -6,8 +6,8 @@ use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; 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 +328,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 +337,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']);