From: Jeff Becker Date: Sun, 31 Dec 2017 14:25:00 +0000 (-0500) Subject: apply proxy settings to media_proxy X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=1e185b9301ec85cd2aaeb1faf075aaa86f733373;p=akkoma apply proxy settings to media_proxy --- diff --git a/lib/pleroma/web/media_proxy/controller.ex b/lib/pleroma/web/media_proxy/controller.ex index 560a65353..9327e7253 100644 --- a/lib/pleroma/web/media_proxy/controller.ex +++ b/lib/pleroma/web/media_proxy/controller.ex @@ -2,6 +2,8 @@ defmodule Pleroma.Web.MediaProxy.MediaProxyController do use Pleroma.Web, :controller require Logger + @httpoison Application.get_env(:pleroma, :httpoison) + @max_body_length 25 * 1048576 @cache_control %{ @@ -29,7 +31,7 @@ defmodule Pleroma.Web.MediaProxy.MediaProxyController do 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),