From 5bf5ff6e1609cf4299c142dcf69a537183576507 Mon Sep 17 00:00:00 2001 From: matias martinez Date: Wed, 3 Apr 2024 18:42:36 -0300 Subject: [PATCH] fix condition --- backend/src/handlers/authorizer.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/src/handlers/authorizer.ts b/backend/src/handlers/authorizer.ts index 240e5b7..05d2cad 100644 --- a/backend/src/handlers/authorizer.ts +++ b/backend/src/handlers/authorizer.ts @@ -18,7 +18,9 @@ export const authorizer = async ( const geo = await geoIP.lookup(ip) country = geo?.country ?? 'unknown' if ( - country in ['CU', 'IR', 'IQ', 'KP', 'RU', 'SY', 'GB', 'US', 'UA', 'AR'] + ['CU', 'IR', 'IQ', 'KP', 'RU', 'SY', 'GB', 'US', 'UA', 'AR'].includes( + country + ) ) { authorized = false }