From a7024b931f4d359555a12d1255f912114969812d Mon Sep 17 00:00:00 2001 From: Bruno Bernardino Date: Thu, 12 Jan 2023 15:04:55 +0000 Subject: [PATCH] Fix user-agent matching --- deno.json | 3 ++- routes.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/deno.json b/deno.json index b97aa99..56a759d 100644 --- a/deno.json +++ b/deno.json @@ -32,5 +32,6 @@ ] } }, - "importMap": "./import_map.json" + "importMap": "./import_map.json", + "lock": false } diff --git a/routes.ts b/routes.ts index ae6cbfc..44b7267 100644 --- a/routes.ts +++ b/routes.ts @@ -39,7 +39,7 @@ function createBasicRouteHandler(id: string, pathname: string) { if (!request.url.startsWith('http://localhost')) { if ( !request.headers.get('user-agent')?.match( - /(duckduckgo|adsbot-google|googlebot|mediapartners-google|slurp|bingbot|bingpreview|msnbot)/i, + /(duckduckgo|adsbot-google|googlebot|mediapartners-google|slurp|bingbot|bingpreview|msnbot|feedly|inoreader|newsblur|feedbin|theoldreader|dreamwidth|bazqux|bloglovin|wrangler|nextcloud|digitalocean|alittle)/i, ) ) { recordPageView(match.pathname.input);