Unverified Commit 1e185b93 authored by jeff's avatar jeff
Browse files

apply proxy settings to media_proxy

parent 39854d6c
......@@ -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 @@ def remote(conn, %{"sig" => sig, "url" => url}) 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),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment