debug /api/v1/suggestions
authorhakabahitoyo <hakabahitoyo@example.com>
Wed, 5 Dec 2018 07:08:34 +0000 (16:08 +0900)
committerhakabahitoyo <hakabahitoyo@example.com>
Wed, 5 Dec 2018 07:08:34 +0000 (16:08 +0900)
lib/pleroma/web/mastodon_api/mastodon_api_controller.ex

index ea64f163db1037b0c53724d84932757d9ff5fbbf..f9007a808c81e4a4ae835d664ae626ae330da67f 100644 (file)
@@ -1169,7 +1169,15 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
       url = String.replace(api, "{{host}}", host) |> String.replace("{{user}}", user)
 
       with {:ok, %{status: 200, body: body}} <-
-             @httpoison.get(url, [], timeout: timeout, recv_timeout: timeout),
+             @httpoison.get(
+               url,
+               [],
+               follow_redirect: true,
+               adapter: [
+                 timeout: timeout,
+                 recv_timeout: timeout
+               ]
+             ),
            {:ok, data} <- Jason.decode(body) do
         data2 =
           Enum.slice(data, 0, limit)