Update HttpSignature

This commit is contained in:
Daniel Supernault 2023-04-19 19:04:41 -06:00
parent f17ca9d904
commit 9ffe5941d7
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -17,8 +17,14 @@ class ActivityPubFetchService
return 0;
}
$headers = HttpSignature::instanceActorSign($url, false);
$baseHeaders = [
'Accept' => 'application/activity+json',
'User-Agent' => '(Pixelfed/'.config('pixelfed.version').'; +'.config('app.url').')'
];
$headers = HttpSignature::instanceActorSign($url, false, $baseHeaders);
$headers['Accept'] = 'application/activity+json';
$headers['User-Agent'] = '(Pixelfed/'.config('pixelfed.version').'; +'.config('app.url').')';
try {
$res = Http::withHeaders($headers)