From: Roger Braun Date: Tue, 2 May 2017 15:44:55 +0000 (+0200) Subject: Follow webfinger redirects. X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=b104348fa52c6ea51b9a159b145a48ca74a22332;p=akkoma Follow webfinger redirects. --- diff --git a/lib/pleroma/web/web_finger/web_finger.ex b/lib/pleroma/web/web_finger/web_finger.ex index 402184d3f..d16bdd982 100644 --- a/lib/pleroma/web/web_finger/web_finger.ex +++ b/lib/pleroma/web/web_finger/web_finger.ex @@ -92,7 +92,7 @@ defmodule Pleroma.Web.WebFinger do response = with {:ok, result} <- getter.("https:" <> address, ["Accept": "application/xrd+xml"], [params: [resource: account]]) do {:ok, result} else _ -> - getter.("http:" <> address, ["Accept": "application/xrd+xml"], [params: [resource: account]]) + getter.("http:" <> address, ["Accept": "application/xrd+xml"], [params: [resource: account], follow_redirect: true]) end with {:ok, %{status_code: status_code, body: body}} when status_code in 200..299 <- response,