amazon web services - How to get the CloudFront endpoint country of a client request? -
my website hosted in s3 , cloudfront distribution pointing it.
in website need know country request website comes from.
is there way cloudfront add information based on cloudfront endpoints location request, maybe header or so?
http://docs.aws.amazon.com/amazoncloudfront/latest/developerguide/header-caching.html
if want cloudfront cache different versions of objects based on country request came from, configure cloudfront forward cloudfront-viewer-country header origin. cloudfront automatically converts ip address request came two-letter country code. easy-to-use list of country codes, sortable code , country name, see wikipedia entry iso 3166-1 alpha-2.
Comments
Post a Comment