AEMaaCS:如何在CDN响应中添加自定义标题

cdn.yaml中编写流量筛选器规则,并通过配置管道进行部署。

描述 description

环境

Adobe Experience Manager as a Cloud Service (AEMaaCS)

问题

如何在CDN层添加自定义响应标头。

解决方法 resolution

cdn.yaml中编写流量筛选器规则,并通过配置管道进行部署。

示例:

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