Setting up separate domain in Dispatcher for accessing Content Fragments

Avatar

Avatar

visa679

Avatar

visa679

visa679

08-04-2021

Hi all,

We are implementing Content Fragments to expose content for multiple Mobile applications and below is the structure we are planning to have it.

assets

       Mobilesite1

                  CF1, CF2 ..etc

        Mobilesite2

                  CF1, CF2...etc

We want to expose these fragments using a single domain and this domain should access only content fragments from above structure. Also other AEM website domains( we already have mutliple vhost entries in dispatcher)  should not have access to these Content fragments.

 

How to setup dispatcher for the domain to expose only content fragments and restrict other website domains to expose these content fragments?

 

We are still evaluating options to expose Content Fragments either by Assets API url or using Sling Model Exporter. But not sure whether this will have any impact in defining dispatcher rules to expose CF using a domain.

 

Appreciate suggestions..

 

Thanks.

 

 

 

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar

asutosh_j3

Avatar

asutosh_j3

asutosh_j3

08-04-2021

Hi @visa679 

You can setup another v-host and farm file for the content fragment domain and allow only the specific paths that is required for the content fragements.

Rest all paths can be blocked in these files.

 

/filter 
{
/0001 { /type "deny" /glob "*" }
/0002 { /type "allow" /url "/api/contentfragementpath" } # allowing only the content fragement paths
$include "commons/filter.any" # if you have any common rules
}

 

Same way for other brands you can allow only brand specific files and the content fragement paths will be blocked there so they will not be able to access it via dispatcher.

 

Hope this helps!

Thanks!