diff --git a/app/controllers/mirador_controller.rb b/app/controllers/mirador_controller.rb index 8a854a9a..47fa814b 100644 --- a/app/controllers/mirador_controller.rb +++ b/app/controllers/mirador_controller.rb @@ -2,6 +2,14 @@ class MiradorController < ApplicationController include BlacklightHelper + # Allows Mirador to use inline JS to open viewer in new tab + content_security_policy(only: :show) do |policy| + policy.script_src_attr :self, :unsafe_inline, 'siteimproveanalytics.com www.googletagmanager.com' + policy.script_src_elem :self, :unsafe_inline, 'siteimproveanalytics.com www.googletagmanager.com' # policy.style_src :self, :unsafe_inline + policy.style_src_attr :self, :unsafe_inline + policy.style_src_elem :self, :unsafe_inline + end + def show @oid = number_or_nil params[:oid] @manifest = @oid ? manifest_url(@oid) : nil diff --git a/app/views/application/landing.html.erb b/app/views/application/landing.html.erb index 84feb4af..d4a1747a 100644 --- a/app/views/application/landing.html.erb +++ b/app/views/application/landing.html.erb @@ -129,7 +129,7 @@
<%= render partial: 'shared/ga_body' %> -