Let Sentry DSN through CSP
This commit is contained in:
parent
a110a395c1
commit
5cd3711e2f
1 changed files with 8 additions and 0 deletions
|
@ -91,6 +91,7 @@ defp csp_string do
|
|||
static_url = Pleroma.Web.Endpoint.static_url()
|
||||
websocket_url = Pleroma.Web.Endpoint.websocket_url()
|
||||
report_uri = Config.get([:http_security, :report_uri])
|
||||
sentry_dsn = Config.get([:frontend_configurations, :soapbox_fe, "sentryDsn"])
|
||||
|
||||
img_src = "img-src 'self' data: blob:"
|
||||
media_src = "media-src 'self'"
|
||||
|
@ -122,6 +123,13 @@ defp csp_string do
|
|||
connect_src
|
||||
end
|
||||
|
||||
connect_src =
|
||||
if sentry_dsn do
|
||||
[connect_src, " ", build_csp_param(sentry_dsn)]
|
||||
else
|
||||
connect_src
|
||||
end
|
||||
|
||||
script_src =
|
||||
if Config.get(:env) == :dev do
|
||||
"script-src 'self' 'unsafe-eval'"
|
||||
|
|
Loading…
Reference in a new issue