mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Block UI when CNAME target is invalid
This commit is contained in:
@@ -5,6 +5,7 @@ include_once __DIR__ . '/../shared/web.php';
|
||||
global $utopia, $response, $request, $layout, $version, $providers, $projectDB;
|
||||
|
||||
use Utopia\View;
|
||||
use Utopia\Domains\Domain;
|
||||
use Database\Database;
|
||||
use Database\Validator\UID;
|
||||
use Storage\Storage;
|
||||
@@ -116,9 +117,15 @@ $utopia->get('/console/settings')
|
||||
->desc('Platform console project settings')
|
||||
->label('permission', 'public')
|
||||
->label('scope', 'console')
|
||||
->action(function () use ($layout) {
|
||||
->action(function () use ($request, $layout) {
|
||||
$target = new Domain($request->getServer('_APP_DOMAINS_TARGET', ''));
|
||||
|
||||
$page = new View(__DIR__.'/../../views/console/settings/index.phtml');
|
||||
|
||||
$page
|
||||
->setParam('customDomains', ($target->isKnown() && !$target->isTest()))
|
||||
;
|
||||
|
||||
$layout
|
||||
->setParam('title', APP_NAME.' - Settings')
|
||||
->setParam('body', $page);
|
||||
|
||||
Reference in New Issue
Block a user