1
0
Fork 0
mirror of synced 2024-07-02 21:20:58 +12:00

fix: proxy create rule 500

This commit is contained in:
loks0n 2023-11-06 14:44:00 +00:00
parent 9fc7c1384a
commit 8b24c44fb9

View file

@ -87,8 +87,12 @@ 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, 'Invalid domain. Domain may not start with http:// or https://.');
}
$ruleId = ID::unique();
$rule = new Document([
'$id' => $ruleId,