mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-25 06:23:18 +00:00
Update ActivityPubFetchService, add url validation
This commit is contained in:
parent
ea8e426174
commit
654b08d382
1 changed files with 4 additions and 0 deletions
|
@ -11,6 +11,10 @@ class ActivityPubFetchService
|
||||||
{
|
{
|
||||||
public static function get($url)
|
public static function get($url)
|
||||||
{
|
{
|
||||||
|
if(!Helpers::validateUrl($url)) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
$headers = HttpSignature::instanceActorSign($url, false, [
|
$headers = HttpSignature::instanceActorSign($url, false, [
|
||||||
'Accept' => 'application/activity+json, application/json',
|
'Accept' => 'application/activity+json, application/json',
|
||||||
'User-Agent' => '(Pixelfed/'.config('pixelfed.version').'; +'.config('app.url').')'
|
'User-Agent' => '(Pixelfed/'.config('pixelfed.version').'; +'.config('app.url').')'
|
||||||
|
|
Loading…
Reference in a new issue