Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events
SOLVED

Lack of SSI in AEMaaCS Dispatcher

Avatar

Level 2

Reading through the docs for AEM as a Cloud Service for Dispatcher. Obviously there are a lot of limitations imposed there (still working through the "this won't be possible anymore" effects of it. One thing that struck me was this:
https://experienceleague.adobe.com/docs/experience-manager-cloud-service/implementing/content-delive...

It seems that the Cloud's Dispatcher doesn't include BASIC! things like support for Server Side Includes... Are there any plans in place to improve this? The docs vaguely mention that in future it could potentially include more modules.... What's the reasoning for not having something as basic as SSI (paired with for example SDI)

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

I think, this does work now. I checked with local sdk and dispatcher setup. Changes are below

https://github.com/arunpatidar02/aemaacs-aemlab/pull/21/files 



Arun Patidar

View solution in original post

7 Replies

Avatar

Community Advisor

Hi,

I am no expert on AEMaaCS but what I think is the reason for not including everything to AEMaaCS because AEMaaCS is just not a migration to the cloud it is more. e.g. using microservices to do offline processing for assets, changing replication, etc.

There is a lot of feature from traditional AEM has been removed e.g. Campaign, Product etc. and getting added gardually.

 

But you can expore https://sling.apache.org/documentation/bundles/dynamic-includes.html to implement SSI in AEMaaCS if it is not available OOTB.

 

 



Arun Patidar

Avatar

Level 2
HI Arun, I think you missed the point here a bit. The bundle you mentioned will work ok on AEM as a Cloud. BUT! There is Apache bit to it - a dedicated module needs to be enabled on Apache to get Server Side Includes to work (or alternatively ESI could be turned on in Fastly). None of those currently works on AEM SaaS - which effectively means that it's IMPOSSIBLE right now to do ESI/SSI on what Adobe provides for AEM SaaS. The only option to achieve this right now from what I understand is to set up your own CDN/HTTP server in front of AEM as a Cloud infrastructure and resolve ESI/SSI there - this means extra infra which kind of defeats the purpose of AEM SaaS being a ready to use offering

Avatar

Correct answer by
Community Advisor

I think, this does work now. I checked with local sdk and dispatcher setup. Changes are below

https://github.com/arunpatidar02/aemaacs-aemlab/pull/21/files 



Arun Patidar

Avatar

Level 2

Hi,

When I check the list of allowed Apache modules I don't see mod_include there

So I assume that it's not supported correctly when deployed to cloud. Did you test it on an actual cloud instance (local SDK is quite far away from the actual thing).

 

Best Regards,
TS

Avatar

Community Advisor

Hi @Tomasz_Sobczyk 

I did not test this on actual cloud since I don't have any sandbox to test this.

but I tested on dispatcher docker image provided by adobe

https://experienceleague.adobe.com/docs/experience-manager-learn/cloud-service/local-development-env... 



Arun Patidar

Avatar

Level 3

I am trying to test this on local publish sdk and docker image for dispatcher.

Dispatcher is unable to include the directive:

[an error occurred while processing this directive]

<!-- SDI include (path: /conf/cisco-dcloud/settings/wcm/templates/page-home/structure/_jcr_content/root/experiencefragment-header.xf.html/cisco-dcloud/components/experiencefragment, resourceType: cisco-dcloud/components/experiencefragment) -->

 

Changes done in vhost file are as below:

 

<Directory />
<IfModule disp_apache2.c>
# Some items cache with the wrong mime type
# Use this option to use the name to auto-detect mime types when cached improperly
ModMimeUsePathInfo On
# Use this option to avoid cache poisioning
# Sling will return /content/image.jpg as well as /content/image.jpg/ but apache can't search /content/image.jpg/ as a file
# Apache will treat that like a directory. This assures the last slash is never stored in cache
DirectorySlash Off
# Enable the dispatcher file handler for apache to fetch files from AEM
SetHandler dispatcher-handler
</IfModule>
Options FollowSymLinks Includes
AllowOverride None
# Insert filter
SetOutputFilter DEFLATE
# Don't compress images
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
# Prevent clickjacking
Header always append X-Frame-Options SAMEORIGIN
</Directory>
<Directory "${DOCROOT}">
# Add Includes to enable SSI Includes used by Sling Dynamic Include
Options FollowSymLinks Includes

# Required to have dispatcher-handler process includes
ModMimeUsePathInfo On

# Set includes to process .html files
AddOutputFilter INCLUDES .html
AllowOverride None
Require all granted
</Directory>

 

Changes in rules.any

 

/0013 {
/glob "*.nocache.html*"
/type "deny"
}

 

Config file:

{

"include-filter.config.enabled": true,

"include-filter.config.path": "/conf/cisco-dcloud/settings/wcm/templates",

"include-filter.config.resource-types": ["cisco-dcloud/components/experiencefragment"],

"include-filter.config.include-type": "SSI",

"include-filter.config.add_comment": true,

"include-filter.config.selector": "xf",

"include-filter.config.ttl": "",

"include-filter.config.required_header": "Server-Agent=Communique-Dispatcher",

"include-filter.config.ignoreUrlParams": [],

"include-filter.config.rewrite": true

}

Avatar

Level 3

It got fixed by allowing the filter entry

 

# Allow xf
/0112 { /type "allow" /extension "html" /selectors "xf" /path "/conf/cisco-dcloud/settings/wcm/templates/*" }