Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

How to get the users country via CDN header?

TB3dock
Level 7
Level 7

with Episerver cloud, the backend code simply reads the clients country code from the CF-IPCountry header which cloudflare puts on to each request automatically. 

 

What do you get with AEM cloud?  it has flastly, which i understand has similar functionality to cloudflare?

 

Basically, we need block/route requests based on which country they are from, and do logic in our AEM app.

 

We wrote a simple servlet to dump the headers, deployed it to the cloud env, and then when we hit the servlet we dont see the x-aem-client-country header.  to fix we need to add it to clientheaders.any

 

 

 

 

 

 

 

 

1 Accepted Solution
Ritesh_M
Correct answer by
Community Advisor
Community Advisor

Hi @TB3dock ,

 

we have something called x-aem-client-country which you can get from request header for this.

 

https://experienceleague.adobe.com/docs/experience-manager-cloud-service/implementing/content-delive...

View solution in original post

2 Replies
Ritesh_M
Correct answer by
Community Advisor
Community Advisor

Hi @TB3dock ,

 

we have something called x-aem-client-country which you can get from request header for this.

 

https://experienceleague.adobe.com/docs/experience-manager-cloud-service/implementing/content-delive...

View solution in original post

TB3dock
Level 7
Level 7
This doesnt seem to work for us, see updated question above.