Added vietnam server
Signed-off-by: Alexander Borsuk <me@alex.bio>
This commit is contained in:
parent
3ec9d9e5b9
commit
cc43bceb03
1 changed files with 15 additions and 1 deletions
|
@ -111,6 +111,11 @@ export const SERVER = {
|
|||
url: 'https://cdn-us-west1.organicmaps.app/',
|
||||
dataVersions: 2,
|
||||
},
|
||||
vi1: {
|
||||
// Vietnam, unlimited 1Gbps bandwidth
|
||||
url: 'https://cdn-vi1.organicmaps.app/',
|
||||
dataVersions: 5,
|
||||
},
|
||||
};
|
||||
|
||||
// Exported for tests.
|
||||
|
@ -140,11 +145,20 @@ export async function getServersList(request: Request) {
|
|||
// See https://developers.cloudflare.com/firewall/cf-firewall-language/fields for a list of all continents.
|
||||
case 'NA': // North America
|
||||
case 'SA': // South America
|
||||
case 'OC': // Oceania
|
||||
servers = [SERVER.us_east1, SERVER.us_west1, SERVER.uk1, SERVER.nl1, SERVER.planet].filter((server) =>
|
||||
DATA_VERSIONS.slice(-server.dataVersions).includes(dataVersion),
|
||||
);
|
||||
break;
|
||||
case 'OC': // Oceania
|
||||
servers = [SERVER.vi1, SERVER.us_east1, SERVER.us_west1, SERVER.planet].filter((server) =>
|
||||
DATA_VERSIONS.slice(-server.dataVersions).includes(dataVersion),
|
||||
);
|
||||
break;
|
||||
case 'AS': // Asia
|
||||
servers = [SERVER.vi1, SERVER.uk1, SERVER.nl1, SERVER.planet].filter((server) =>
|
||||
DATA_VERSIONS.slice(-server.dataVersions).includes(dataVersion),
|
||||
);
|
||||
break;
|
||||
default:
|
||||
// Every other continent + Tor networks.
|
||||
servers = [SERVER.planet, SERVER.uk1, SERVER.nl1, SERVER.fi1, SERVER.de1, SERVER.de2, SERVER.de3].filter(
|
||||
|
|
Loading…
Add table
Reference in a new issue