Browse Source

Merge pull request #5092 from pixelfed/staging

Update ActivityPubFetchService, fix Friendica bug
daniel 1 year ago
parent
commit
4e023d7a7a
2 changed files with 8 additions and 1 deletions
  1. 1 0
      CHANGELOG.md
  2. 7 1
      app/Services/ActivityPubFetchService.php

+ 1 - 0
CHANGELOG.md

@@ -8,6 +8,7 @@
 - Update ApiV1Controller, add pe (pixelfed entity) support to /api/v1/statuses/{id}/context endpoint ([d645d6ca](https://github.com/pixelfed/pixelfed/commit/d645d6ca))
 - Update Admin Curated Onboarding, add select-all/mass action operations ([b22cac94](https://github.com/pixelfed/pixelfed/commit/b22cac94))
 - Update AdminCuratedRegisterController, fix existing account approval ([cbb96cfd](https://github.com/pixelfed/pixelfed/commit/cbb96cfd))
+- Update ActivityPubFetchService, fix Friendica bug ([e4edc6f1](https://github.com/pixelfed/pixelfed/commit/e4edc6f1))
 -  ([](https://github.com/pixelfed/pixelfed/commit/))
 
 ## [v0.12.1 (2024-05-07)](https://github.com/pixelfed/pixelfed/compare/v0.12.0...v0.12.1)

+ 7 - 1
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)