diff --git a/freebuff/web/src/app/home-client.tsx b/freebuff/web/src/app/home-client.tsx index 3487f3a65..3ccd90fa3 100644 --- a/freebuff/web/src/app/home-client.tsx +++ b/freebuff/web/src/app/home-client.tsx @@ -31,7 +31,7 @@ const faqs = [ { question: 'Which countries is Freebuff available in?', answer: - 'Freebuff is currently available in:\n\nUnited States, Canada, United Kingdom, Australia, New Zealand, Norway, Sweden, Netherlands, Denmark, Germany, Finland, Belgium, Luxembourg, Switzerland, Ireland, and Iceland.', + 'Freebuff is currently available in:\n\nUnited States, Canada, United Kingdom, Australia, New Zealand, Norway, Sweden, Netherlands, Denmark, Germany, Finland, Belgium, Luxembourg, Liechtenstein, Switzerland, Austria, Singapore, Malta, Israel, Ireland, and Iceland.', }, { question: 'Are you training on my data?', diff --git a/web/src/server/__tests__/free-mode-country.test.ts b/web/src/server/__tests__/free-mode-country.test.ts index 3523b1e77..2166f49c9 100644 --- a/web/src/server/__tests__/free-mode-country.test.ts +++ b/web/src/server/__tests__/free-mode-country.test.ts @@ -20,16 +20,25 @@ const noAnonymousNetwork = { const IPINFO_PRIVACY_TEST_IP = '198.51.100.42' describe('free mode country access', () => { - test('allows allowlisted Cloudflare countries', async () => { + test.each([ + ['us', 'US'], + ['LU', 'LU'], + ['LI', 'LI'], + ['CH', 'CH'], + ['AT', 'AT'], + ['SG', 'SG'], + ['MT', 'MT'], + ['IL', 'IL'], + ])('allows allowlisted Cloudflare country %s', async (header, expected) => { const access = await getFreeModeCountryAccess( makeReq({ - 'cf-ipcountry': 'us', + 'cf-ipcountry': header, 'cf-connecting-ip': '203.0.113.10', }), noAnonymousNetwork, ) expect(access.allowed).toBe(true) - expect(access.countryCode).toBe('US') + expect(access.countryCode).toBe(expected) expect(access.blockReason).toBe(null) }) diff --git a/web/src/server/free-mode-country.ts b/web/src/server/free-mode-country.ts index c5454cf13..4e5457dd4 100644 --- a/web/src/server/free-mode-country.ts +++ b/web/src/server/free-mode-country.ts @@ -22,7 +22,12 @@ export const FREE_MODE_ALLOWED_COUNTRIES = new Set([ 'FI', 'BE', 'LU', + 'LI', 'CH', + 'AT', + 'SG', + 'MT', + 'IL', 'IE', 'IS', ])