Merge branch 'develop' into stable
[akkoma] / lib / pleroma / web / plugs / http_security_plug.ex
index 43b075447e71cb37858f88243baf4b44aa6c45fe..fc2f7b268926a7b676d6108af5171f5af3027c2f 100644 (file)
@@ -104,12 +104,13 @@ defmodule Pleroma.Web.Plugs.HTTPSecurityPlug do
         {[img_src, " https:"], [media_src, " https:"]}
       end
 
-    connect_src = 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 'self' blob: ", static_url, ?\s, websocket_url]
-    end
+    connect_src =
+      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 'self' blob: ", static_url, ?\s, websocket_url]
+      end
 
     script_src =
       if Config.get(:env) == :dev do