commit: 0b41dad7193197750c4f4da862d52aebf83529eb
parent: 9a6bc159cd3c547e9b2387925188293fe50ffb78
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Fri, 1 Feb 2019 13:10:50 +0100
Plugs.HTTPSecurityPlug: Add unsafe-eval to script-src when in dev mode
This is needed to run dev mode mastofe at the same time
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/pleroma/plugs/http_security_plug.ex b/lib/pleroma/plugs/http_security_plug.ex
@@ -43,9 +43,11 @@ defmodule Pleroma.Plugs.HTTPSecurityPlug do
"media-src 'self' https:",
"style-src 'self' 'unsafe-inline'",
"font-src 'self'",
- "script-src 'self'",
"connect-src 'self' " <> String.replace(Pleroma.Web.Endpoint.static_url(), "http", "ws"),
"manifest-src 'self'",
+ if Mix.env() == :dev do
+ "script-src 'self' 'unsafe-eval'"
+ end,
if protocol == "https" do
"upgrade-insecure-requests"
end