summaryrefslogtreecommitdiff
path: root/test/media_proxy_test.exs
diff options
context:
space:
mode:
authorRoman Chvanikov <chvanikoff@gmail.com>2019-04-30 20:17:52 +0700
committerRoman Chvanikov <chvanikoff@gmail.com>2019-04-30 20:17:52 +0700
commit0f0cc2703b7ffb99c58e72782925ea4dd61db41d (patch)
treef640d180d16797a6da98a7d1e1cb7c6fb6350392 /test/media_proxy_test.exs
parentb87ad13803df59d88feb736c3d0ff9cf514989d7 (diff)
parent32a4501d2d1cdfef68cbde236482e0c84cce3a7a (diff)
downloadpleroma-0f0cc2703b7ffb99c58e72782925ea4dd61db41d.tar.gz
pleroma-0f0cc2703b7ffb99c58e72782925ea4dd61db41d.zip
Merge develop
Diffstat (limited to 'test/media_proxy_test.exs')
-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