ActivityPub: follow redirects when fetching user
authoreal <eal@waifu.club>
Mon, 20 Aug 2018 11:51:13 +0000 (14:51 +0300)
committereal <eal@waifu.club>
Mon, 20 Aug 2018 12:03:25 +0000 (15:03 +0300)
lib/pleroma/web/activity_pub/activity_pub.ex

index ec605b694f49557b0f7dcfb472618ae98d324439..cb14f6a577dc1ffb3ef8d5c47809f54e5597c62b 100644 (file)
@@ -565,7 +565,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
 
   def fetch_and_prepare_user_from_ap_id(ap_id) do
     with {:ok, %{status_code: 200, body: body}} <-
-           @httpoison.get(ap_id, Accept: "application/activity+json"),
+           @httpoison.get(ap_id, [Accept: "application/activity+json"], follow_redirect: true),
          {:ok, data} <- Jason.decode(body) do
       user_data_from_user_object(data)
     else