0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-09-19 23:31:11 +02:00
discourse-custom-wizard/lib/custom_wizard/extensions/content_security_policy_extension.rb
2022-04-11 12:21:38 +02:00

12 Zeilen
417 B
Ruby

# 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