diff --git a/app/controllers/api/proxy.php b/app/controllers/api/proxy.php index f9621fb05a..23916a114c 100644 --- a/app/controllers/api/proxy.php +++ b/app/controllers/api/proxy.php @@ -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([