X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/385272bdae07c702d245b20c172bcb998259c8c6..f047f86c1d4add3b6cd8074ccaa9b940fa2d0fd8:/app/controllers/export_controller.rb diff --git a/app/controllers/export_controller.rb b/app/controllers/export_controller.rb index 94851de96..cddc97b68 100644 --- a/app/controllers/export_controller.rb +++ b/app/controllers/export_controller.rb @@ -4,6 +4,10 @@ class ExportController < ApplicationController before_action :update_totp, :only => [:finish] authorize_resource :class => false + content_security_policy(:only => :embed) do |policy| + policy.frame_ancestors("*") + end + caches_page :embed # When the user clicks 'Export' we redirect to a URL which generates the export download @@ -25,9 +29,5 @@ class ExportController < ApplicationController end end - def embed - append_content_security_policy_directives( - :frame_ancestors => %w[*] - ) - end + def embed; end end