From af308814e24c874063691c7e28d49b7606f5cd8f Mon Sep 17 00:00:00 2001 From: Alexander Borsuk Date: Thu, 13 Jan 2022 22:04:25 +0100 Subject: [PATCH] Fixed 404 icon request Signed-off-by: Alexander Borsuk --- src/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 1500ef2..61fee24 100644 --- a/src/index.ts +++ b/src/index.ts @@ -8,9 +8,11 @@ const GOOGLE = 'https://play.google.com/store/apps/details?id=app.organicmaps'; const HUAWEI = 'https://appgallery.huawei.com/#/app/C104325611'; const FDROID = 'https://f-droid.org/en/packages/app.organicmaps/'; const OMAPS_REWRITE_RULES: Record = { + '/apple-touch-icon.png': '/icons/apple-touch-icon.png', + '/apple-touch-icon-precomposed.png': '/icons/apple-touch-icon.png', + '/apple-app-site-association': '/apple-app-site-association.json', // Hidden files and symlinks are not uploaded by wrangler. // See https://developers.cloudflare.com/workers/cli-wrangler/configuration#default-ignored-entries - '/apple-app-site-association': '/apple-app-site-association.json', '/.well-known/apple-app-site-association': '/apple-app-site-association.json', '/.well-known/assetlinks.json': '/assetlinks.json', '/': '/get.html', @@ -74,7 +76,7 @@ async function handleFetchEvent(event: FetchEvent) { // Try to return a static resource first. try { return await getAssetFromKV(event, getAssetOptions); - } catch (_) {} + } catch (_) { } // No static resource were found, try to handle a specific dynamic request. getAssetOptions.mapRequestToAsset = (request: Request) => { const url = new URL(request.url);