CDN proxy redirect using selectOrigin not working | Community
Skip to main content
sarav_prakash
Community Advisor
Community Advisor
February 24, 2025
Solved

CDN proxy redirect using selectOrigin not working

  • February 24, 2025
  • 2 replies
  • 634 views

Hi, 

I want to redirect my domain traffic to appbuilder project. I copy pasted the exact adobe example for origin selectors

 

 

 

kind: "CDN" version: "1" metadata: envTypes: ["dev"] data: originSelectors: rules: - name: content-hub-portal when: allOf: - reqProperty: domain equals: "aem-dev-contenthub.example.com" action: type: selectOrigin originName: portal-live origins: - name: portal-live domain: 712524-contenthubportal-stage.adobeio-static.net

 

 

I expect upon hitting https://aem-dev-contenthub.example.com/ it would proxy redirect to app builder. But it is always hitting AEM dispatcher. 

 

Any hint how to troubleshoot cdn pipelines? How to debug why this redirect is not working as expected?

 

Can you please share a working cdn.yaml config file where you implemented selectOrigin and it worked?

 

Edit:

I referred to this post and changed the config like this, still same result, traffic always hitting publisher and not redirecting to appbuilder. I can confirm appbuilder works from browser. just cdn.yaml is not redirecting traffic. 

kind: "CDN" version: "1" metadata: envTypes: ["dev"] data: originSelectors: rules: - name: staging when: { reqProperty: domain, like: aem-dev-contenthub.example.com } action: type: selectOrigin originName: mysite-staging-url origins: - name: mysite-staging-url domain: 712524-contenthubportal-stage.adobeio-static.net forwardHost: false

 

If anyone got your selectOrigin working successfully? can you please share the config yaml?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by daniel-strmecki

Hi @sarav_prakash,

I give it a try and the origin selection feature is working fine for me. Maybe compare your code with this example:

 

originSelectors: rules: # Route requests to /webhp to www.google.com domain - name: "origin-google-com" when: allOf: - reqProperty: tier equals: "publish" - reqProperty: path equals: "/webhp" action: type: selectOrigin originName: google-com origins: - name: google-com domain: www.google.com

 

 

Good luck,

Daniel

2 replies

kautuk_sahni
Community Manager
Community Manager
February 26, 2025

@estebanbustamante @aanchal-sikka @narendragandhi @somen-sarkar @ayush-anand @kapil_rajoria @sady_rifat @nishanth_kr @madalavenkat7 Would appreciate it if you could check out this question and share any insights you might have!

Kautuk Sahni
daniel-strmecki
Community Advisor and Adobe Champion
daniel-strmeckiCommunity Advisor and Adobe ChampionAccepted solution
Community Advisor and Adobe Champion
February 26, 2025

Hi @sarav_prakash,

I give it a try and the origin selection feature is working fine for me. Maybe compare your code with this example:

 

originSelectors: rules: # Route requests to /webhp to www.google.com domain - name: "origin-google-com" when: allOf: - reqProperty: tier equals: "publish" - reqProperty: path equals: "/webhp" action: type: selectOrigin originName: google-com origins: - name: google-com domain: www.google.com

 

 

Good luck,

Daniel

sarav_prakash
Community Advisor
Community Advisor
February 27, 2025

thanks. actually its same as adobe documentation. 

 

Seems there are 2 documentations to configure cdn.yaml. I followed second document. But missed to mark the /config folder in pipeline which was explained in first documentation.

 

https://experienceleague.adobe.com/en/docs/experience-manager-learn/cloud-service/security/traffic-filter-and-waf-rules/how-to-setup

https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/operations/config-pipeline#folder-structure

 

 

So this is not the yaml code error. instead I was missing to include the /config folder  into the pipeline. When I created new pipeline and added /config, it started working. Thanks for looking though.