From e39bf37f917adddff4ba1bf7eec3c1297df3ab76 Mon Sep 17 00:00:00 2001 From: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com> Date: Tue, 5 Mar 2024 02:42:56 +0530 Subject: [PATCH] chore: remove CF-region (#13828) Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com> --- .../trpc/server/routers/publicViewer/countryCode.handler.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/trpc/server/routers/publicViewer/countryCode.handler.ts b/packages/trpc/server/routers/publicViewer/countryCode.handler.ts index 723632e088..ed67a3d959 100644 --- a/packages/trpc/server/routers/publicViewer/countryCode.handler.ts +++ b/packages/trpc/server/routers/publicViewer/countryCode.handler.ts @@ -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 }; };