1
0
Fork 0
mirror of synced 2024-09-30 17:26:48 +13:00

Merge pull request #7084 from appwrite/fix-proxy-create-rule-500

fix: proxy create rule 500
This commit is contained in:
Christy Jacob 2023-11-07 10:49:52 -08:00 committed by GitHub
commit fd7b354113
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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([