Trap for cdn abusers with a specific map/app version (#89)
This commit is contained in:
parent
cbe27ccda4
commit
50c140ebcb
1 changed files with 6 additions and 0 deletions
|
@ -122,6 +122,12 @@ export async function getServersList(request: Request) {
|
|||
if (dataVersion === null) {
|
||||
// Older clients download from the archive.
|
||||
servers = [SERVER.backblaze];
|
||||
} else if (dataVersion == 240702 && request.headers.get('x-om-appversion') == '1.8.6-4-ios') {
|
||||
// Redirect https://apps.apple.com/us/app/mapxplorer-navigation-radar/id6463052823
|
||||
// who abuses our servers to a slow download "trap" node.
|
||||
return new Response('["https://cdn-fi2.organicmaps.app/"]', {
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
});
|
||||
} else {
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
//@ts-ignore workarounds error TS2339: Property 'continent' does not exist on type 'IncomingRequestCfProperties<unknown>'.
|
||||
|
|
Loading…
Add table
Reference in a new issue