aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHakaba Hitoyo <hakabahitoyo@example.com>2018-12-06 10:48:05 +0900
committerHakaba Hitoyo <hakabahitoyo@example.com>2018-12-06 10:48:05 +0900
commit505d82082726aa91fc2511165a67e266ce16ec4f (patch)
tree3713ffcf97a695d1b8465c5cb5a812f370cb7a59 /lib
parent48a03156465ec5c653101a57d4c899d0c6ffe1cf (diff)
parenta418547bdfc95b72497faa0eb5da69b04f6a8566 (diff)
downloadpleroma-505d82082726aa91fc2511165a67e266ce16ec4f.tar.gz
Merge remote-tracking branch 'origin/debug-suggestions-api' into correct-and-improve-http-options
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/mastodon_api/mastodon_api_controller.ex10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
index 15373dd90..300bdc04a 100644
--- a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
+++ b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
@@ -1182,7 +1182,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)