Class: Pageflow::PrimaryDomainEntryRedirect
- Inherits:
-
Object
- Object
- Pageflow::PrimaryDomainEntryRedirect
- Defined in:
- lib/pageflow/primary_domain_entry_redirect.rb
Overview
Use as Configuration#public_entry_redirect to make sure entries are accessed via their account’s configured cname.
Instance Method Summary collapse
Instance Method Details
#call(entry, request) ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/pageflow/primary_domain_entry_redirect.rb', line 7 def call(entry, request) site = entry.site if site.cname.present? && !known_domains(site).include?(request.host) [request.protocol, site.cname, request.fullpath].join end end |