Skip to content

Commit 9cfe371

Browse files
authored
fix(cloudflare): use the code for the geolocation region (#625)
Use the ISO 3166-2 region code rather than the fullname. See: - https://developers.cloudflare.com/workers/runtime-apis/request/ - https://vercel.com/guides/geo-ip-headers-geolocation-vercel-functions#geolocation-headers
1 parent 44f3678 commit 9cfe371

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/open-next/src/overrides/wrappers/cloudflare.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type { MiddlewareOutputEvent } from "../../core/routingHandler";
66
const cfPropNameToHeaderName = {
77
city: "x-open-next-city",
88
country: "x-open-next-country",
9-
region: "x-open-next-region",
9+
regionCode: "x-open-next-region",
1010
latitude: "x-open-next-latitude",
1111
longitude: "x-open-next-longitude",
1212
};

0 commit comments

Comments
 (0)