CDN YAML Origin Filter Issue Causing Pipeline Failure in AEM Cloud
- August 27, 2024
- 3 replies
- 1223 views
I’m currently working on creating the cdn.yaml file in AEM Cloud. The requirement is to include both traffic filters and origin filters. While the traffic filters are fine, I’m running into some issues with the origin filters.
The requirements are as follows:
- www.test.com/pages/privacy – Should be served from AEM
- www.test.com/gyms/*/services/personal-training – Should be served from AEM
- www.test.com/services/personal-training* – Should be served from AEM
All other pages should be served from a different CMS domain. Additionally, any requests with the domain checkout.test.com should be served through Azure.
I’ve created the CDN YAML file based on these requirements.
However, the Dev Full Stack pipeline is failing at the Product Functional Testing step, and the error (attached) occurs every time.
Could someone help identify what needs to be fixed in the CDN YAML file?
CDN yaml file :
kind: "CDN"
version: "1"
metadata:
envTypes: ["dev"]
data:
trafficFilters:
rules:
- name: limit-origin-requests-client-ip
when:
reqProperty: tier
equals: 'publish'
rateLimit:
limit: 100
window: 10
count: fetches
penalty: 300
groupBy:
- reqProperty: clientIp
action: log
- name: limit-requests-client-ip
when:
reqProperty: tier
equals: 'publish'
rateLimit:
limit: 500
window: 10
count: all
penalty: 300
groupBy:
- reqProperty: clientIp
action: log
- name: block-ofac-countries
when:
allOf:
- { reqProperty: tier, in: ["author", "publish"] }
- reqProperty: clientCountry
in:
- SY
- BY
- MM
- KP
- IQ
- CD
- SD
- IR
- LR
- ZW
- CU
- CI
action: log
originSelectors:
rules:
- name: azure
when:
reqProperty: domain
equals: checkout.test.com
action:
type: selectOrigin
originName: azure
- name: another-cdn
when:
allOf:
- {reqProperty: tier, equals: 'publish'}
- {reqProperty: path, doesNotMatch: '^\/pages\/.*'}
- {reqProperty: path, doesNotMatch: '^\/gyms\/.*\/services\/personal-training'}
- {reqProperty: path, doesNotMatch: '^\/services\/personal-training.*'}
action:
type: selectOrigin
originName: another-cdn
origins:
- name: azure
domain: test.azurestaticapps.net
- name: another-cdn
domain: www01.dev.test.dev