We are using dynamic component in one of the page which is getting cached on dispatcher. We have two different urls(Vanity domain and Non Vanity domain) for end user access.
Consider this example
/content/brand/organization/home(NonVanity domain - org.com)
/content/brand/suborganization1/home(Vanity domain- org1.com)
/content/brand/suborganization2/home(Vanity domain - org2.com)
Sub organization home page can be accessed using this non vanity domain too with the help of rewrite rules.
SDI component is working on non vanity domain (SDI include tag is getting replaced by dynamic content from publisher). But this component is not working on above vanity domains (sdi include tag is not replaced with dynamic content from publisher)
Looking for any pointers how to debug and resolve this issue.
Please not that vanity domain is not related AEM vanity url functionality.
I am no expert here, but I believe that SDI configuration works only for the base path given in the OSGi Config.
I would suggest making use of dispatcher redirects instead of vanity so that we control everything at the dispatcher level itself rather giving control to the Sling framework.
Also, try including your vanity URLs too in the base path of configuration and check.