diff --git a/app/controllers/general.php b/app/controllers/general.php index 0ac19d5897..445563301d 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -51,7 +51,11 @@ App::init(function ($utopia, $request, $response, $console, $project, $user, $lo $port = \parse_url($request->getOrigin($referrer), PHP_URL_PORT); $refDomain = (!empty($protocol) ? $protocol : $request->getProtocol()).'://'.((\in_array($origin, $clients)) - ? $origin : 'localhost') . (!empty($port) ? ':'.$port : ''); + ? $origin : 'localhost').(!empty($port) ? ':'.$port : ''); + + $refDomain = (!$route->getLabel('origin', false)) // This route is publicly accessible + ? $refDomain + : (!empty($protocol) ? $protocol : $request->getProtocol()).'://'.$origin.(!empty($port) ? ':'.$port : ''); $selfDomain = new Domain($request->getHostname()); $endDomain = new Domain((string)$origin); @@ -110,7 +114,7 @@ App::init(function ($utopia, $request, $response, $console, $project, $user, $lo } $response->addHeader('Strict-Transport-Security', 'max-age='.(60 * 60 * 24 * 126)); // 126 days - } + } $response ->addHeader('Server', 'Appwrite') diff --git a/app/views/console/account/index.phtml b/app/views/console/account/index.phtml index 84a18521de..3f1e7decc9 100644 --- a/app/views/console/account/index.phtml +++ b/app/views/console/account/index.phtml @@ -29,6 +29,8 @@
Update Password PLEASE NOTE: Account deletion is irreversible.

getParam('version', '').'.'.APP_CACHE_BUSTER;
- Manage Your Server API Keys + Manage Your Server API Keys
@@ -221,6 +239,8 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled',true);

New Web App

getParam('usageStatsEnabled',true);