Update AP Helpers

This commit is contained in:
Daniel Supernault 2019-04-04 19:57:13 -06:00
parent 916ffe268f
commit 1580bb6b4b
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -141,7 +141,19 @@ class Helpers {
$valid = filter_var($url, FILTER_VALIDATE_URL); $valid = filter_var($url, FILTER_VALIDATE_URL);
if(in_array(parse_url($valid, PHP_URL_HOST), $localhosts)) { if(!$valid) {
return false;
}
$host = parse_url($valid, PHP_URL_HOST);
if(config('costar.enabled') == true) {
if(in_array($host, config('costar.domain.block')) == true) {
return false;
}
}
if(in_array($host, $localhosts)) {
return false; return false;
} }