From 882661e22ceeabdf0ee155af960f525df586bbb7 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Thu, 28 Jan 2021 10:56:43 +0100 Subject: [PATCH] Clean some unused config key Signed-off-by: Thomas Citharel --- config/config.exs | 3 +-- lib/web/media_proxy.ex | 4 ---- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/config/config.exs b/config/config.exs index a2e6a0db3..7c09a22c1 100644 --- a/config/config.exs +++ b/config/config.exs @@ -92,8 +92,7 @@ config :mobilizon, :media_proxy, follow_redirect: true, pool: :media ] - ], - whitelist: [] + ] config :mobilizon, Mobilizon.Web.Email.Mailer, adapter: Bamboo.SMTPAdapter, diff --git a/lib/web/media_proxy.ex b/lib/web/media_proxy.ex index eede9e72c..9e6512df9 100644 --- a/lib/web/media_proxy.ex +++ b/lib/web/media_proxy.ex @@ -29,10 +29,6 @@ defmodule Mobilizon.Web.MediaProxy do def enabled?, do: Config.get([:media_proxy, :enabled], false) - # Note: media proxy must be enabled for media preview proxy in order to load all - # non-local non-whitelisted URLs through it and be sure that body size constraint is preserved. - def preview_enabled?, do: enabled?() and !!Config.get([:media_preview_proxy, :enabled]) - def local?(url), do: String.starts_with?(url, Web.Endpoint.url()) defp base64_sig64(url) do