aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/media_proxy/controller.ex
diff options
context:
space:
mode:
authorIvan Tashkinov <ivantashkinov@gmail.com>2019-02-17 14:07:04 +0300
committerIvan Tashkinov <ivantashkinov@gmail.com>2019-02-17 14:07:04 +0300
commitbc4f77b10bb4360ac00d1999b1d08fa55e1fa547 (patch)
tree8c87c2cefd1e325a64a19c04d7d7d70ffd8cc485 /lib/pleroma/web/media_proxy/controller.ex
parentdcf24a3233bb50689d26f9d7833f98158730ce35 (diff)
parent3b141194715e362d65482672d00b10991d102fa2 (diff)
downloadpleroma-bc4f77b10bb4360ac00d1999b1d08fa55e1fa547.tar.gz
[#468] Merged `upstream/develop`, resolved conflicts.
Diffstat (limited to 'lib/pleroma/web/media_proxy/controller.ex')
-rw-r--r--lib/pleroma/web/media_proxy/controller.ex5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/pleroma/web/media_proxy/controller.ex b/lib/pleroma/web/media_proxy/controller.ex
index de79cad73..c0552d89f 100644
--- a/lib/pleroma/web/media_proxy/controller.ex
+++ b/lib/pleroma/web/media_proxy/controller.ex
@@ -4,11 +4,12 @@
defmodule Pleroma.Web.MediaProxy.MediaProxyController do
use Pleroma.Web, :controller
- alias Pleroma.{Web.MediaProxy, ReverseProxy}
+ alias Pleroma.ReverseProxy
+ alias Pleroma.Web.MediaProxy
@default_proxy_opts [max_body_length: 25 * 1_048_576, http: [follow_redirect: true]]
- def remote(conn, params = %{"sig" => sig64, "url" => url64}) do
+ def remote(conn, %{"sig" => sig64, "url" => url64} = params) do
with config <- Pleroma.Config.get([:media_proxy], []),
true <- Keyword.get(config, :enabled, false),
{:ok, url} <- MediaProxy.decode_url(sig64, url64),