chore: remove CF-region (#13828)
Co-authored-by: Joe Au-Yeung <[email protected]>
This commit is contained in:
1 parent
1f845944ac
commit
e39bf37f91
1 file changed
+1
-2
@@ -7,8 +7,7 @@ type CountryCodeOptions = {
|
||||
export const countryCodeHandler = async ({ ctx }: CountryCodeOptions) => {
|
||||
const { req } = ctx;
|
||||
|
||||
const countryCode: string | string[] =
|
||||
req?.headers?.["cf-ipcountry"] ?? req?.headers?.["x-vercel-ip-country"] ?? "";
|
||||
const countryCode: string | string[] = req?.headers?.["x-vercel-ip-country"] ?? "";
|
||||
return { countryCode: Array.isArray(countryCode) ? countryCode[0] : countryCode };
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user