Remove unnecessary extensions
Dieser Commit ist enthalten in:
Ursprung
1f320aac93
Commit
0970b49db8
2 geänderte Dateien mit 0 neuen und 19 gelöschten Zeilen
|
@ -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
|
|
@ -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)
|
||||
|
|
Laden …
In neuem Issue referenzieren