X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Fplugs%2Fhttp_security_plug.ex;h=fc2f7b268926a7b676d6108af5171f5af3027c2f;hb=19272be0ce6f8cd1b0d4a940c713d13fdf87b5b1;hp=d1e6cc9d3f03f00c7f19dc475345714641711812;hpb=c435de426d045118ed7be3d77f659f349d2d2245;p=akkoma diff --git a/lib/pleroma/web/plugs/http_security_plug.ex b/lib/pleroma/web/plugs/http_security_plug.ex index d1e6cc9d3..fc2f7b268 100644 --- a/lib/pleroma/web/plugs/http_security_plug.ex +++ b/lib/pleroma/web/plugs/http_security_plug.ex @@ -68,7 +68,7 @@ defmodule Pleroma.Web.Plugs.HTTPSecurityPlug do ] } - [{"reply-to", Jason.encode!(report_group)} | headers] + [{"report-to", Jason.encode!(report_group)} | headers] else headers end @@ -104,13 +104,12 @@ defmodule Pleroma.Web.Plugs.HTTPSecurityPlug do {[img_src, " https:"], [media_src, " https:"]} end - connect_src = ["connect-src 'self' blob: ", static_url, ?\s, websocket_url] - connect_src = - if Config.get(:env) == :dev do - [connect_src, " http://localhost:3035/"] + if Config.get([:media_proxy, :enabled]) do + sources = build_csp_multimedia_source_list() + ["connect-src 'self' blob: ", static_url, ?\s, websocket_url, ?\s, sources] else - connect_src + ["connect-src 'self' blob: ", static_url, ?\s, websocket_url] end script_src =