mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-26 08:13:16 +00:00
Update AP Helpers
This commit is contained in:
parent
916ffe268f
commit
1580bb6b4b
1 changed files with 13 additions and 1 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue