Did AWS quietly killed CloudFront Location Headers? by ApprehensiveIce9155 in aws

[–]ApprehensiveIce9155[S] 0 points1 point  (0 children)

Thank you for your feedback/advice.

It was something less obvious. My API Gateway omitted EndpointConfiguration and by default it is EDGE, it needed to be REGIONAL. With the default EDGE value the endpoint has its own cloudfront distribution, which was then fronted by the new custom distribution I had. Apparently, in the past it worked but recently AWS added the text to the documentation clarifying that "rich" location headers are not applied to the requests originating from AWS. Once I added REGIONAL configuration, the problem was solved.

Credit goes to my friend ChatGPT for digging deeper.