mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
debug
This commit is contained in:
@@ -709,9 +709,6 @@ App::options()
|
||||
*/
|
||||
$host = $request->getHostname() ?? '';
|
||||
$mainDomain = System::getEnv('_APP_DOMAIN', '');
|
||||
var_dump('host='.$host);
|
||||
var_dump('mainDomain='.$mainDomain);
|
||||
var_dump('previewHostname='.$previewHostname);
|
||||
// Only run Router when external domain
|
||||
if ($host !== $mainDomain || !empty($previewHostname)) {
|
||||
if (router($utopia, $dbForConsole, $getProjectDB, $swooleRequest, $request, $response, $queueForEvents, $queueForUsage, $queueForFunctions, $geodb, $isResourceBlocked, $previewHostname)) {
|
||||
|
||||
@@ -545,11 +545,7 @@ App::init()
|
||||
$data = $cache->load($key, $timestamp);
|
||||
|
||||
if (!empty($data) && !$cacheLog->isEmpty()) {
|
||||
var_dump($request->getURI());
|
||||
var_dump($request->getParams());
|
||||
var_dump($cacheLog);
|
||||
var_dump($data);
|
||||
$parts = explode('/', $cacheLog->getAttribute('resourceType'));
|
||||
$parts = explode('/', $cacheLog->getAttribute('resourceType', ''));
|
||||
$type = $parts[0] ?? null;
|
||||
|
||||
if ($type === 'bucket') {
|
||||
|
||||
+2
-3
@@ -950,7 +950,6 @@ $register->set('pools', function () {
|
||||
},
|
||||
'redis' => function () use ($dsnHost, $dsnPort, $dsnPass) {
|
||||
$redis = new Redis();
|
||||
var_dump('RedisHost='.$dsnHost);
|
||||
@$redis->pconnect($dsnHost, (int)$dsnPort);
|
||||
if ($dsnPass) {
|
||||
$redis->auth($dsnPass);
|
||||
@@ -1336,8 +1335,8 @@ App::setResource('project', function ($dbForConsole, $request, $console) {
|
||||
$project = Authorization::skip(fn () => $dbForConsole->getDocument('projects', $projectId));
|
||||
|
||||
if ($project->getAttribute('region') !== System::getEnv('_APP_REGION')) {
|
||||
var_dump('_APP_REGION='. System::getEnv('_APP_REGION'));
|
||||
var_dump('projectRegion='. $project->getAttribute('region'));
|
||||
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');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user