MediaProxy: :whitelist config fallback to []

This commit is contained in:
Haelwenn (lanodan) Monnier 2023-08-02 12:30:09 +02:00 committed by Mark Felder
parent 66ac2e9b81
commit 2180537a2b

View File

@ -75,8 +75,7 @@ defmodule Pleroma.Web.MediaProxy do
%{host: domain} = URI.parse(url) %{host: domain} = URI.parse(url)
mediaproxy_whitelist_domains = mediaproxy_whitelist_domains =
[:media_proxy, :whitelist] Config.get([:media_proxy, :whitelist], [])
|> Config.get()
|> Kernel.++(["#{Upload.base_url()}"]) |> Kernel.++(["#{Upload.base_url()}"])
|> Enum.map(&maybe_get_domain_from_url/1) |> Enum.map(&maybe_get_domain_from_url/1)