Merge remote-tracking branch 'origin/multi-region-support' into multi-region-support

This commit is contained in:
shimon committed 2024-12-14 20:23:32 +02:00
commit e154407fc6
6 files changed
+23 -20

No files matched your search

+1 -1
View File
@@ -1334,7 +1334,7 @@ App::setResource('project', function ($dbForPlatform, $request, $console) {
$project = Authorization::skip(fn () => $dbForPlatform->getDocument('projects', $projectId));
if ($project->getAttribute('region') !== System::getEnv('_APP_REGION')) {
if ($project->getAttribute('region') !== System::getEnv('_APP_REGION', 'default')) {
var_dump(System::getEnv('_APP_REGION'));
var_dump($project->getAttribute('region'));
throw new Exception(Exception::GENERAL_ACCESS_FORBIDDEN, 'Project is not accessible in this region. Please make sure you are using the correct endpoint');