diff --git a/lib/content_security_policy/default.rb b/lib/content_security_policy/default.rb index 7a6f1d24a5..d0c8203dd5 100644 --- a/lib/content_security_policy/default.rb +++ b/lib/content_security_policy/default.rb @@ -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