Server Side Include on internal Dispatchers on AEMaaCS
Hello Adobe Community,
I'm currently trying to solve a problem regarding SSI includes on every internal instance, so dev, qa and stage. This issue does not happen on the prod-instance, but I'd still like to fix it to properly test the functionality also on other instances. Its annoying that it only works locally and on prod.
The problem is that SSI components are not properly served on the internal instances. Instead it shows the following error message:
[an error occurred while processing this directive]
Looking through the dispatcher error logs, it shows some more details about the problem:
unable to include "/content/XXX/en/_jcr_content/root/header/search.icon.ssi.html" in parsed file /mnt/var/www/html/content/XXX/en/test.html, subrequest setup returned 401
I have increased the LogLevel to check if maybe Debug gives more information, but haven't found useful debug information on this.
To me it looks like when the dispatcher tries to load and serve the SSI parts via subrequests, it drops the authorization header and thus is not able to serve this data. After all the internal publish-instances are only accessible after authorization. This would also explain why this problem doesn't happen on the prod-instance, as over there the SSI and other content is public anyway.
Trying to access the SSI content directly via browser or postman also works when sending the proper auth headers.
However, this is just a guess of mine and I'm not sure what the exact problem is and how to solve it. I wasn't able to find a solution for this either, or even somebody running into the same logs.
Version of our AEMaaCS instances is 2025.3.19823.20250304T101418Z-250200 (but I guess its more of an dispatcher issue).
Here the AEM OSGI configuration for our Sling Dynamic Include:
{
"include-filter.config.enabled": true,
"include-filter.config.path": "/content",
"include-filter.config.resource-types": [
... components are here ...
],
"include-filter.config.ignoreUrlParams": [],
"include-filter.config.include-type": "SSI",
"include-filter.config.selector": "ssi",
"include-filter.config.extension": "html",
"include-filter.config.required_header": "Server-Agent=Communique-Dispatcher",
"include-filter.config.add_comment": true,
"include-filter.config.rewrite": false,
"include-filter.config.appendSuffix": false,
"include-filter.config.disableIgnoreUrlParams": false
}Has anyone faced this issue before and knows a solution to it? Or this maybe a limitation of AEMaaCS?
Any help would be greatly appreciated!