ÃÛ¶¹ÊÓƵ

AEMaaCS: How to add custom headers in CDN response

Write a traffic filter rule in cdn.yaml and deploy it via the Config pipeline.

Description description

Environment

ÃÛ¶¹ÊÓƵ Experience Manager as a Cloud Service (AEMaaCS)

Issue

How to add custom response headers at the CDN layer.

Resolution resolution

Write a traffic filter rule in cdn.yaml and deploy it via the Config pipeline.

Example:

kind: "CDN"
version: "1"
metadata:
  envTypes: [ "dev"]
data:
  responseTransformations:
    rules:
      - name: custom-response-headers-rule
        when:
          reqProperty: path
          like: "/content/dam/*"
        actions:
          - type: set
            respHeader: X-Custom-Header-1
            value: value1
          - type: set
            respHeader: X-Custom-Header-2
            value: value2
recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f