diff options
author | Haelwenn (lanodan) Monnier <contact@hacktivis.me> | 2019-02-01 13:10:50 +0100 |
---|---|---|
committer | Haelwenn (lanodan) Monnier <contact@hacktivis.me> | 2019-02-12 22:12:11 +0100 |
commit | 00e8f0b07dd3dced84b0317e1c5c4156d249dec4 (patch) | |
tree | 5018677e63379698274cdd2d9c8d2a38e918f23e /lib | |
parent | 71ce564ecc442614995c021281a8f1e1a67fabc1 (diff) | |
download | pleroma-00e8f0b07dd3dced84b0317e1c5c4156d249dec4.tar.gz |
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 (limited to 'lib')
-rw-r--r-- | lib/pleroma/plugs/http_security_plug.ex | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/pleroma/plugs/http_security_plug.ex b/lib/pleroma/plugs/http_security_plug.ex index 3c8e6a18f..05e935f2c 100644 --- 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 scheme == "https" do "upgrade-insecure-requests" end |