mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 08:58:35 +00:00
Fix url parsing
This commit is contained in:
parent
47dbf4c8f6
commit
60028250a2
1 changed files with 4 additions and 2 deletions
|
|
@ -67,8 +67,10 @@ App::init()
|
|||
|
||||
// Function Preview
|
||||
if(\str_ends_with($host, App::getEnv('_APP_DOMAIN_FUNCTIONS'))) {
|
||||
$host = rtrim($host, App::getEnv('_APP_DOMAIN_FUNCTIONS'));
|
||||
$host = rtrim($host, '.');
|
||||
// Remove domain from host
|
||||
$previewDomain = App::getEnv('_APP_DOMAIN_FUNCTIONS');
|
||||
$host = \substr($host, 0, -1 * (1 + \strlen($previewDomain))); // +1 for starting dot (.)
|
||||
|
||||
$subdomains = explode('.', $host);
|
||||
|
||||
if(\count($subdomains) === 2) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue