Sha256: e12e3dcc3352a4187783c9aa5cc498573fb14621a87b9a04d8915492a05e422a
Contents?: true
Size: 606 Bytes
Versions: 57
Compression:
Stored size: 606 Bytes
Contents
module Pageflow # Use as {Configuration#public_entry_redirect} to make sure entries # are accessed via their account's configured cname. # # @since 12.4 class PrimaryDomainEntryRedirect def call(entry, request) theming = entry.theming if theming.cname.present? && !known_domains(theming).include?(request.host) [request.protocol, theming.cname, request.fullpath].join end end private def known_domains(theming) [ theming.cname, (theming.additional_cnames || '').split(',').map(&:strip) ].flatten end end end
Version data entries
57 entries across 57 versions & 1 rubygems