@pack/hydrogen 3.3.0 → 3.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -5108,6 +5108,21 @@ function buildIdentityBundle(request, options = {}) {
5108
5108
  hasConsent,
5109
5109
  userAgent,
5110
5110
  deviceType: userAgent ? detectDeviceType(userAgent) : "desktop",
5111
+ // Host-provided geo-IP, first header present wins. Every name here is one
5112
+ // the host defines, and they must carry the same FORMAT across hosts:
5113
+ // country as ISO 3166-1 alpha-2, region as an ISO 3166-2 subdivision code.
5114
+ //
5115
+ // Defined is not the same as delivered. Only `oxygen-buyer-*` and
5116
+ // `cf-ipcountry` arrive unconditionally; `cf-region-code` needs
5117
+ // Cloudflare's "Add visitor location headers" managed transform, which is
5118
+ // off by default, so a Workers deployment behind plain Cloudflare has no
5119
+ // region and its region audiences match nobody. That is fine while
5120
+ // storefronts are on Oxygen (which sets it from request.cf) — revisit if a
5121
+ // storefront ever fronts an origin with Cloudflare directly.
5122
+ // Oxygen also exposes `oxygen-buyer-region`, but that is the full name
5123
+ // ("California") — mixing it in would make an audience configured as "CA"
5124
+ // match on Cloudflare/Vercel and never on Oxygen, since matchGeo compares
5125
+ // the whole string.
5111
5126
  geo: {
5112
5127
  country: firstHeader(
5113
5128
  request,
@@ -5117,7 +5132,7 @@ function buildIdentityBundle(request, options = {}) {
5117
5132
  ),
5118
5133
  region: firstHeader(
5119
5134
  request,
5120
- "oxygen-buyer-province",
5135
+ "oxygen-buyer-region-code",
5121
5136
  "cf-region-code",
5122
5137
  "x-vercel-ip-country-region"
5123
5138
  )