mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-23 08:14:10 +00:00
Update ActivityPubFetchService, add validateUrl parameter to bypass url validation to fetch content from blocked instances
This commit is contained in:
parent
f2dfe12ac3
commit
3d1b6516fe
1 changed files with 6 additions and 4 deletions
|
@ -11,11 +11,13 @@ use Illuminate\Http\Client\RequestException;
|
||||||
|
|
||||||
class ActivityPubFetchService
|
class ActivityPubFetchService
|
||||||
{
|
{
|
||||||
public static function get($url)
|
public static function get($url, $validateUrl = true)
|
||||||
{
|
{
|
||||||
if(!Helpers::validateUrl($url)) {
|
if($validateUrl === true) {
|
||||||
return 0;
|
if(!Helpers::validateUrl($url)) {
|
||||||
}
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$baseHeaders = [
|
$baseHeaders = [
|
||||||
'Accept' => 'application/activity+json, application/ld+json',
|
'Accept' => 'application/activity+json, application/ld+json',
|
||||||
|
|
Loading…
Reference in a new issue