- headers = [{"user-agent", "Pleroma/MediaProxy; #{Pleroma.Web.base_url()} <#{Application.get_env(:pleroma, :instance)[:email]}>"}]
- options = @httpoison.process_request_options([:insecure, {:follow_redirect, true}]) ++ [{:pool, :default}]
- with \
- {:ok, 200, headers, client} <- :hackney.request(:get, link, headers, "", options),
- headers = Enum.into(headers, Map.new),
- {:ok, body} <- proxy_request_body(client),
- content_type <- proxy_request_content_type(headers, body)
- do
+ headers = [
+ {"user-agent",
+ "Pleroma/MediaProxy; #{Pleroma.Web.base_url()} <#{
+ Application.get_env(:pleroma, :instance)[:email]
+ }>"}
+ ]
+
+ options =
+ @httpoison.process_request_options([:insecure, {:follow_redirect, true}]) ++
+ [{:pool, :default}]
+
+ with {:ok, 200, headers, client} <- :hackney.request(:get, link, headers, "", options),
+ headers = Enum.into(headers, Map.new()),
+ {:ok, body} <- proxy_request_body(client),
+ content_type <- proxy_request_content_type(headers, body) do