Skip to content

Commit

Permalink
fix condition
Browse files Browse the repository at this point in the history
  • Loading branch information
mat1asm committed Apr 3, 2024
1 parent c37eb9f commit 5bf5ff6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion backend/src/handlers/authorizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 5bf5ff6

Please sign in to comment.