mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 10:43:57 +08:00
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:
parent
5f1e346e16
commit
e7402b3feb
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user