diff --git a/lib/custom_wizard/extensions/content_security_policy_extension.rb b/lib/custom_wizard/extensions/content_security_policy_extension.rb deleted file mode 100644 index fa7a166c..00000000 --- a/lib/custom_wizard/extensions/content_security_policy_extension.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -module CustomWizardContentSecurityPolicyExtension - def path_specific_extension(path_info) - super.tap do |obj| - for_wizard_qunit_route = !Rails.env.production? && ["/w/qunit"].include?(path_info) - puts "PATH INFO: #{path_info}" - puts "FOR WIZARD QUNIT ROUTE: #{for_wizard_qunit_route}" - obj[:script_src] = :unsafe_eval if for_wizard_qunit_route - end - end -end diff --git a/plugin.rb b/plugin.rb index 3c0a840a..a397e3a7 100644 --- a/plugin.rb +++ b/plugin.rb @@ -22,8 +22,6 @@ if Rails.env.production? } end -puts "BEFORE ADD ASSET PATHS" - if Rails.env.test? config = Rails.application.config plugin_asset_path = "#{Rails.root}/plugins/discourse-custom-wizard/assets" @@ -82,8 +80,6 @@ def each_globbed_asset end end -puts "LOADING CUSTOM WIZARD PLUGIN" - after_initialize do %w[ ../lib/custom_wizard/engine.rb @@ -148,7 +144,6 @@ after_initialize do ../lib/custom_wizard/extensions/custom_field/serializer.rb ../lib/custom_wizard/extensions/custom_field/extension.rb ../lib/custom_wizard/extensions/discourse_tagging.rb - ../lib/custom_wizard/extensions/content_security_policy_extension.rb ].each do |path| load File.expand_path(path, __FILE__) end @@ -254,8 +249,6 @@ after_initialize do ::InvitesController.prepend InvitesControllerCustomWizard ::UsersController.prepend CustomWizardUsersController ::Guardian.prepend CustomWizardGuardian - puts "PREPENDING CSP EXTENSION" - ::ContentSecurityPolicy::Extension.singleton_class.prepend CustomWizardContentSecurityPolicyExtension full_path = "#{Rails.root}/plugins/discourse-custom-wizard/assets/stylesheets/wizard/wizard_custom.scss" if Stylesheet::Importer.respond_to?(:plugin_assets)