diff options
author | Mark Felder <feld@FreeBSD.org> | 2019-04-25 18:11:47 -0500 |
---|---|---|
committer | Mark Felder <feld@FreeBSD.org> | 2019-04-25 18:11:47 -0500 |
commit | 24c3e2db2c6846073df80c124633dc851c20c107 (patch) | |
tree | a2b5c9a0c322ee68c363ce6c8b78c64525a0987b /test | |
parent | 8c9227c1f1fa9c98069b549976be5b9c4ace076e (diff) | |
download | pleroma-24c3e2db2c6846073df80c124633dc851c20c107.tar.gz |
Add mediaproxy whitelist capability
Diffstat (limited to 'test')
-rw-r--r-- | test/media_proxy_test.exs | 9 |
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 |