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