mirror of
https://github.com/appwrite/appwrite
synced 2026-05-06 06:48:22 +00:00
Merge branch 'fix-domain-validator' into 1.7.x
This commit is contained in:
commit
88459923b0
1 changed files with 2 additions and 0 deletions
|
|
@ -74,10 +74,12 @@ class Get extends Action
|
|||
|
||||
$restrictions = [];
|
||||
if (!empty($sitesDomain)) {
|
||||
// Ensure site domains are exactly 1 subdomain, and dont start with reserved prefix
|
||||
$domainLevel = \count(\explode('.', $sitesDomain));
|
||||
$restrictions[] = DomainValidator::createRestriction($sitesDomain, $domainLevel + 1, ['commit-', 'branch-']);
|
||||
}
|
||||
if (!empty($functionsDomain)) {
|
||||
// Ensure function domains are exactly 1 subdomain
|
||||
$domainLevel = \count(\explode('.', $functionsDomain));
|
||||
$restrictions[] = DomainValidator::createRestriction($functionsDomain, $domainLevel + 1);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue