Tutorial: Setting up a Reverse Proxy With HubSpot CMS (with sample nginx & Cloudfront configs !)

I’m looking for support on getting location-personalized content to work with a reverse proxy. We’ve had a reverse proxy set up for HubSpot for a while, but location-based content is not working correctly. We include the X-HubSpot-Trust-Forwarded-For: true header, and looking at the /_hcms/diagnostics page for our hosted page, the Effective IP is the desired client IP for location-based content.
These are the diagnostics results; I’ve redacted some of the information.

Current time: 2025-02-19T20:51:57.398Z
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36
Accept-Language: en
Accept-Encoding: gzip, br
Cookie: <not present>
Protocol: https
X-Client-IP: <not present>
True-Client-IP:{NAT gateway IP}
X-Real-IP: {NAT gateway IP}
X-Forwarded-For: 212.53.203.31, ...other IPs,{NAT gateway IP}
X-HubSpot-Trust-Forwarded-For: true
x-hs-public-host: <not present>
Edge-Determined Country: US
Edge-Determined Device Type: desktop
Effective IP: 212.53.203.31
Effective IP Source: X-Forwarded-For
IP-Determined Country: de
IP-Determined Region: hamburg
IP-Determined City: hamburg
IP-Determined Organization: artfiles new media
Host: ***.com
X-Forwarded-Host: ***.com

Despite the Effective IP and IP-Determined Country displaying correctly, location-based features are still not working. I see the Edge-Determined Country is still US like our gateway address. Could this be the source of the contents’ determined country?
This is contradictory to the documentation that indicates that personalized-location content should work when the X-Forwarded-For IP is trusted. https://developers.hubspot.com/docs/guides/cms/content/performance/reverse-proxy-support#:~:text=content%20based%20on-,location,-works%2C%20pass%20a
Would appreciate any ideas from someone who’s seen a similar issue or knows which value actually powers HubSpot location features.