aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/media_proxy_test.exs9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/media_proxy_test.exs b/test/media_proxy_test.exs
index ddbadfbf5..a4331478e 100644
--- a/test/media_proxy_test.exs
+++ b/test/media_proxy_test.exs
@@ -177,4 +177,13 @@ defmodule Pleroma.MediaProxyTest do
{:ok, decoded} = decode_url(sig, base64)
decoded
end
+
+ test "mediaproxy whitelist" do
+ Pleroma.Config.put([:media_proxy, :enabled], true)
+ Pleroma.Config.put([:media_proxy, :whitelist], ["google.com", "feld.me"])
+ url = "https://feld.me/foo.png"
+
+ unencoded = url(url)
+ assert unencoded == url
+ end
end