0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-26 11:00:28 +01:00
discourse-custom-wizard/lib/custom_wizard/extensions/content_security_policy_extension.rb

13 Zeilen
417 B
Ruby

2022-04-11 12:21:38 +02:00
# 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