Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

Updated bot detection library.

Mike Caofb711d58f185
diff --git a/package.json b/package.json
index 485cc221a..d2cda0abb 100644
--- a/package.json
+++ b/package.json
@@ -71,7 +71,7 @@
"formik": "^2.2.6",
"immer": "^8.0.1",
"is-localhost-ip": "^1.4.0",
- "isbot-fast": "^1.2.0",
+ "isbot": "^3.0.25",
"jose": "2.0.3",
"maxmind": "^4.3.1",
"moment-timezone": "^0.5.32",
diff --git a/pages/api/collect.js b/pages/api/collect.js
index a6140169b..98ab54e35 100644
--- a/pages/api/collect.js
+++ b/pages/api/collect.js
@@ -1,14 +1,14 @@
-import isBot from 'isbot-fast';
+import isbot from 'isbot';
import { savePageView, saveEvent } from 'lib/queries';
import { useCors, useSession } from 'lib/middleware';
+import { getIpAddress } from 'lib/request';
import { ok, badRequest } from 'lib/response';
import { createToken } from 'lib/crypto';
-import { getIpAddress } from '../../lib/request';
export default async (req, res) => {
await useCors(req, res);
- if (isBot(req.headers['user-agent'])) {
+ if (isbot(req.headers['user-agent'])) {
return ok(res);
}
diff --git a/yarn.lock b/yarn.lock
index 3d952c2c6..4ecd9b4ea 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -4414,10 +4414,10 @@ [email protected], isarray@^1.0.0, isarray@~1.0.0:
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=
-isbot-fast@^1.2.0:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/isbot-fast/-/isbot-fast-1.2.0.tgz#ef0ef1d5db34eb60777250ae26fceb72b94153e2"
- integrity sha512-twjuQzy2gKMDVfKGQyQqrx6Uy4opu/fiVUTTpdqtFsd7OQijIp5oXvb27n5EemYXaijh5fomndJt/SPRLsEdSg==
+isbot@^3.0.25:
+ version "3.0.25"
+ resolved "https://registry.yarnpkg.com/isbot/-/isbot-3.0.25.tgz#56c9fe4134016ae84204738b59c0364e7a801f7c"
+ integrity sha512-8mLxO0arSU+JYfcJBbwROCzVhqAdqJSMmsyMDVj4dd7enEevjrNCXjoG0oSkIfZ4icPHuxocO1z3k1oDoI/rbw==
isexe@^2.0.0:
version "2.0.0"