Setting up separate domain in Dispatcher for accessing Content Fragments | Community
Skip to main content
Level 3
April 9, 2021
Solved

Setting up separate domain in Dispatcher for accessing Content Fragments

  • April 9, 2021
  • 2 replies
  • 1307 views

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.

 

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Asutosh_Jena_

Hi @antony6790 

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!

2 replies

Asutosh_Jena_
Community Advisor
Asutosh_Jena_Community AdvisorAccepted solution
Community Advisor
April 9, 2021

Hi @antony6790 

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!

Level 3
April 12, 2021
Thanks Asutosh. Our Dispatcher configurations are little different. Will try it out.
Level 3
April 12, 2021
Also as per doc we can use Assets API to do CRUD operation. How to block create/update/delete operations with Assets API?