Sha256: 74cff038e013b25fcdcdc3f8e81b73b5d7412f24068e613c18d9583e6e8dbf9e
Contents?: true
Size: 627 Bytes
Versions: 13
Compression:
Stored size: 627 Bytes
Contents
# frozen_string_literal: true require "active_support/concern" module Decidim module Headers module ContentSecurityPolicy extend ActiveSupport::Concern included do def content_security_policy @content_security_policy ||= Decidim::ContentSecurityPolicy.new(current_organization, Decidim.content_security_policies_extra) end after_action :append_content_security_policy_headers end private def append_content_security_policy_headers response.headers["Content-Security-Policy"] = content_security_policy.output_policy end end end end
Version data entries
13 entries across 13 versions & 1 rubygems