
Why Your Sling Filters Don’t Affect Asset Headers in AEMaaCS?
by @daniel-strmecki
Introduction
When we make a request to fetch an asset from AEM as a Cloud Service (AEMaaCS), our request doesn’t go straight to the AEM Publish instance. Instead, it’s handled by Adobe’s OOTB CDN, which sits in front of AEM Publisher and serves cacheable content directly from the edge.
If the asset isn’t already cached, the CDN may fetch it from the cloud storage backend where AEM Assets binaries are stored. This storage layer behaves like a blob store and is fully managed by Adobe. Once retrieved, the response is cached at the CDN and served directly from there. Therefore, AEM Publisher is no longer involved in most asset delivery requests.
Because of this new cloud architecture, Sling Filters or Servlets that modify response headers don’t affect CDN-served assets. We can still implement response.setHeader() inside AEM, but unless the CDN explicitly allows that header to be forwarded, it won’t appear in the response sent to the end users.
To handle this properly, Adobe recently added a new CDN configuration property that allows us to override headers for assets.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.