Commit 5474b5c9 authored by feld's avatar feld
Browse files

Merge branch 'fix/csp-mediaproxy-base-url' into 'develop'

HTTP security plug: add media proxy base url host to csp

See merge request !2638
parents 5d6ec6e5 7f7a1a46
Pipeline #27105 passed with stages
in 62 minutes and 34 seconds
......@@ -113,6 +113,10 @@ defp get_proxy_and_attachment_sources do
add_source(acc, host)
media_proxy_base_url =
if Config.get([:media_proxy, :base_url]),
do: URI.parse(Config.get([:media_proxy, :base_url])).host
upload_base_url =
if Config.get([Pleroma.Upload, :base_url]),
do: URI.parse(Config.get([Pleroma.Upload, :base_url])).host
......@@ -122,6 +126,7 @@ defp get_proxy_and_attachment_sources do
do: URI.parse(Config.get([Pleroma.Uploaders.S3, :public_endpoint])).host
|> add_source(media_proxy_base_url)
|> add_source(upload_base_url)
|> add_source(s3_endpoint)
|> add_source(media_proxy_whitelist)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment