mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Update src/Appwrite/Platform/Modules/Proxy/Http/Rules/API/Create.php
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
parent
70470f7e2a
commit
267ca3cfb5
@@ -106,9 +106,9 @@ class Create extends Action
|
||||
throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'This domain name is not allowed. Please use a different domain.');
|
||||
}
|
||||
|
||||
if (\str_ends_with($domain, '.appwrite.network')) {
|
||||
$subdomain = \str_replace('.appwrite.network', '', $domain);
|
||||
if (\str_contains($subdomain, '.')) {
|
||||
if (\str_ends_with(\strtolower($domain), '.appwrite.network')) {
|
||||
$subdomain = \str_replace('.appwrite.network', '', \strtolower($domain));
|
||||
if (empty($subdomain) || \str_contains($subdomain, '.')) {
|
||||
throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'Sub-subdomains are not allowed for appwrite.network. Only one level of subdomain is permitted.');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user