DEV: Allow unsafe-eval in development mode

It's needed because of this: 5f1e346e16/lib/source_url.rb (L18-L24)
This commit is contained in:
Gerhard Schlager 2019-12-14 22:36:39 +01:00
parent 5f1e346e16
commit e7402b3feb

View File

@ -51,6 +51,7 @@ class ContentSecurityPolicy
"#{base_url}/mini-profiler-resources/",
*script_assets
].tap do |sources|
sources << :unsafe_eval if Rails.env.development? # TODO Remove this when we stop using `eval` in development mode
sources << 'https://www.google-analytics.com/analytics.js' if SiteSetting.ga_universal_tracking_code.present?
sources << 'https://www.googletagmanager.com/gtm.js' if SiteSetting.gtm_container_id.present?
end