Formatting
authorMark Felder <feld@feld.me>
Sun, 10 Jan 2021 15:03:42 +0000 (09:03 -0600)
committerMark Felder <feld@feld.me>
Sun, 10 Jan 2021 15:03:42 +0000 (09:03 -0600)
lib/pleroma/web/media_proxy.ex

index e4d7f8aa8e3bea3617496db6b870f8c6fb9597e9..cbe7175848deb5d3fc4ee2dddedd5ce42de4bf01 100644 (file)
@@ -79,14 +79,14 @@ defmodule Pleroma.Web.MediaProxy do
       |> Config.get()
       |> Enum.map(&maybe_get_domain_from_url/1)
 
-    whitelist_domains =
-      base_url = Upload.base_url()
-      if Web.base_url() == base_url do
-        mediaproxy_whitelist_domains
-      else
-        %{host: base_domain} = URI.parse(base_url)
-        [base_domain | mediaproxy_whitelist_domains]
-      end
+    whitelist_domains = base_url = Upload.base_url()
+
+    if Web.base_url() == base_url do
+      mediaproxy_whitelist_domains
+    else
+      %{host: base_domain} = URI.parse(base_url)
+      [base_domain | mediaproxy_whitelist_domains]
+    end
 
     domain in whitelist_domains
   end