AEMaaCS CDN – Custom 404 handling (EN + FR)
Hi all,
We’re using AEM as a Cloud Service CDN configuration where requests are routed to Azure Blob Storage using a one-to-one mapping between CDN YAML path patterns and blob container folder structure.
kind: "CDN"
version: "1"
data:
originSelectors:
rules:
- name: "page-origin"
when:
reqProperty: "path"
matches: "^/(page)(/.*)?$"
action:
selectOrigin: "blob-storage-origin"Problem: When a path maps to blob storage but the file does not exist (origin returns 404), we want to display a custom 404 experience and it must support both locales:
English 404 for non-/fr paths
French 404 for /fr/* paths
Question: Is there any supported way in AEMaaCS CDN YAML to:
map/override origin 404 to a custom page/route (rewrite or redirect), and
do this per locale (EN vs FR)?
We looked at errorPages but schema validation indicates only errorPages.spa is supported (no custom “rules” / mapping).
If CDN config cannot do this, what is the recommended approach in AEMaaCS for this use case (Dispatcher error document, AEM Sling error handler, app-level logic, etc.)?
Thanks!