diff --git a/src/servers.ts b/src/servers.ts index 0328bda..4341df4 100644 --- a/src/servers.ts +++ b/src/servers.ts @@ -29,6 +29,13 @@ export const SERVER = { 230227, 230329, 230503, ], }, + beta: { + // Alias of the planet above that is proxied via CF and with enabled /maps/ *.mwm caching, + // to speed-up downloads for beta testers. + url: 'https://cdn-beta.organicmaps.app/', + // Can have any non-publicly available maps data version. + dataVersions: [], + }, fi1: { // Hetzner Cloud (Helsinki, Finland), 20TB/mo url: 'https://cdn-fi1.organicmaps.app/', @@ -90,7 +97,7 @@ export async function getServersList(request: Request) { } // Fallback to the planet with freshly generated/beta data. if (servers.length == 0) { - servers = [SERVER.planet]; + servers = [SERVER.beta, SERVER.planet]; } servers = servers.map((server) => server.url); diff --git a/test/servers.test.ts b/test/servers.test.ts index 3c1c640..6d928ed 100644 --- a/test/servers.test.ts +++ b/test/servers.test.ts @@ -33,7 +33,7 @@ describe('X-OM-DataVersion', () => { }); const result = await getServersList(req); expect(result.status).toBe(200); - expect(JSON.parse(await result.text())).toEqual([SERVER.planet.url]); + expect(JSON.parse(await result.text())).toEqual([SERVER.beta.url, SERVER.planet.url]); }); });