Skip to content

Commit

Permalink
Fix user-agent matching
Browse files Browse the repository at this point in the history
  • Loading branch information
BrunoBernardino committed Jan 12, 2023
1 parent 433e2af commit a7024b9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@
]
}
},
"importMap": "./import_map.json"
"importMap": "./import_map.json",
"lock": false
}
2 changes: 1 addition & 1 deletion routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a7024b9

Please sign in to comment.