Follow webfinger redirects.
authorRoger Braun <roger@rogerbraun.net>
Tue, 2 May 2017 15:44:55 +0000 (17:44 +0200)
committerRoger Braun <roger@rogerbraun.net>
Tue, 2 May 2017 15:44:55 +0000 (17:44 +0200)
lib/pleroma/web/web_finger/web_finger.ex

index 402184d3fc2394c3863094c10174eeb9329effc1..d16bdd982de22244a79e3b7619a48ea7556927dc 100644 (file)
@@ -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,