chore: remove CF-region (#13828)

Co-authored-by: Joe Au-Yeung <[email protected]>
This commit is contained in:
Udit TakkarandJoe Au-Yeung authored and GitHub committed 2024-03-05 02:42:56 +05:30
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 };
};