use Pleroma.Web, :controller
require Logger
+ @httpoison Application.get_env(:pleroma, :httpoison)
+
@max_body_length 25 * 1048576
@cache_control %{
defp proxy_request(link) do
headers = [{"user-agent", "Pleroma/MediaProxy; #{Pleroma.Web.base_url()} <#{Application.get_env(:pleroma, :instance)[:email]}>"}]
- options = [:insecure, {:follow_redirect, true}]
+ options = @httpoison.process_request_options([:insecure, {:follow_redirect, true}])
with \
{:ok, 200, headers, client} <- :hackney.request(:get, link, headers, "", options),
headers = Enum.into(headers, Map.new),