Merge pull request #7084 from appwrite/fix-proxy-create-rule-500
fix: proxy create rule 500
This commit is contained in:
commit
fd7b354113
1 changed files with 5 additions and 1 deletions
|
@ -87,7 +87,11 @@ App::post('/v1/proxy/rules')
|
|||
$resourceInternalId = $function->getInternalId();
|
||||
}
|
||||
|
||||
$domain = new Domain($domain);
|
||||
try {
|
||||
$domain = new Domain($domain);
|
||||
} catch (\Exception) {
|
||||
throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'Domain may not start with http:// or https://.');
|
||||
}
|
||||
|
||||
$ruleId = ID::unique();
|
||||
$rule = new Document([
|
||||
|
|
Loading…
Reference in a new issue