From e4edc6f192ed59727d3b254369d2b7a2a7c6c2ed Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Fri, 17 May 2024 21:45:42 -0600 Subject: [PATCH] Update ActivityPubFetchService, fix Friendica bug --- app/Services/ActivityPubFetchService.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/Services/ActivityPubFetchService.php b/app/Services/ActivityPubFetchService.php index 4b515859c..119199eaa 100644 --- a/app/Services/ActivityPubFetchService.php +++ b/app/Services/ActivityPubFetchService.php @@ -28,7 +28,13 @@ class ActivityPubFetchService $headers['User-Agent'] = 'PixelFedBot/1.0.0 (Pixelfed/'.config('pixelfed.version').'; +'.config('app.url').')'; try { - $res = Http::withOptions(['allow_redirects' => false]) + $res = Http::withoutVerifying() + ->withOptions([ + 'allow_redirects' => [ + 'max' => 2, + 'protocols' => ['https'], + ] + ]) ->withHeaders($headers) ->timeout(30) ->connectTimeout(5)