diff --git a/lib/content_security_policy.rb b/lib/content_security_policy.rb index 7f760c3b79d..f3d32db7c5f 100644 --- a/lib/content_security_policy.rb +++ b/lib/content_security_policy.rb @@ -21,7 +21,6 @@ class ContentSecurityPolicy Extension.theme_extensions(theme_id).each { |extension| builder << extension } Extension.plugin_extensions.each { |extension| builder << extension } builder << Extension.site_setting_extension - builder << Extension.path_specific_extension(path_info) builder.build end diff --git a/lib/content_security_policy/extension.rb b/lib/content_security_policy/extension.rb index 6996e6747de..8ef49fa928f 100644 --- a/lib/content_security_policy/extension.rb +++ b/lib/content_security_policy/extension.rb @@ -7,14 +7,6 @@ class ContentSecurityPolicy { script_src: SiteSetting.content_security_policy_script_src.split("|") } end - def path_specific_extension(path_info) - {}.tap do |obj| - for_qunit_route = !Rails.env.production? && %w[/qunit /wizard/qunit].include?(path_info) - for_qunit_route ||= "/theme-qunit" == path_info - obj[:script_src] = :unsafe_eval if for_qunit_route - end - end - def plugin_extensions [].tap do |extensions| Discourse.plugins.each do |plugin|