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
73a9da15f6
commit
a07184db58
1 changed files with 5 additions and 2 deletions
|
@ -148,7 +148,10 @@ class Helpers {
|
||||||
$host = parse_url($valid, PHP_URL_HOST);
|
$host = parse_url($valid, PHP_URL_HOST);
|
||||||
|
|
||||||
if(config('costar.enabled') == true) {
|
if(config('costar.enabled') == true) {
|
||||||
if(in_array($host, config('costar.domain.block')) == true) {
|
if(
|
||||||
|
(config('costar.domain.block') != null && in_array($host, config('costar.domain.block')) == true) ||
|
||||||
|
(config('costar.actor.block') != null && in_array($url, config('costar.actor.block')) == true)
|
||||||
|
) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -163,7 +166,7 @@ class Helpers {
|
||||||
public static function validateLocalUrl($url)
|
public static function validateLocalUrl($url)
|
||||||
{
|
{
|
||||||
$url = self::validateUrl($url);
|
$url = self::validateUrl($url);
|
||||||
if($url) {
|
if($url == true) {
|
||||||
$domain = config('pixelfed.domain.app');
|
$domain = config('pixelfed.domain.app');
|
||||||
$host = parse_url($url, PHP_URL_HOST);
|
$host = parse_url($url, PHP_URL_HOST);
|
||||||
$url = $domain === $host ? $url : false;
|
$url = $domain === $host ? $url : false;
|
||||||
|
|
Loading…
Reference in a new issue