+ static_url = Pleroma.Web.Endpoint.static_url()
+ websocket_url = Pleroma.Web.Endpoint.websocket_url()
+
+ connect_src = "connect-src 'self' #{static_url} #{websocket_url}"
+
+ connect_src =
+ if Mix.env() == :dev do
+ connect_src <> " http://localhost:3035/"
+ else
+ connect_src
+ end
+
+ script_src =
+ if Mix.env() == :dev do
+ "script-src 'self' 'unsafe-eval'"
+ else
+ "script-src 'self'"
+ end