Sha256: 9852cb34ba195fc86222f8ab96d4413681b74d67ca8d858fe35d92777c396333

Contents?: true

Size: 435 Bytes

Versions: 21

Compression:

Stored size: 435 Bytes

Contents

# frozen_string_literal: true

module ShopifyApp
  module FrameAncestors
    extend ActiveSupport::Concern

    included do
      content_security_policy do |policy|
        policy.frame_ancestors(-> do
          domain_host = current_shopify_domain || "*.#{::ShopifyApp.configuration.myshopify_domain}"
          "#{ShopifyAPI::Context.host_scheme}://#{domain_host} https://admin.shopify.com"
        end)
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
shopify_app-21.1.0 lib/shopify_app/controller_concerns/frame_ancestors.rb