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.

Try reverting to country database.

Mike Cao23d02e5aacc3
diff --git a/lib/detect.js b/lib/detect.js
index e5bdd7335..d332170d4 100644
--- a/lib/detect.js
+++ b/lib/detect.js
@@ -63,7 +63,7 @@ export async function getLocation(ip) {
// Database lookup
if (!lookup) {
- lookup = await maxmind.open(path.resolve('node_modules/.geo/GeoLite2-City.mmdb'));
+ lookup = await maxmind.open(path.resolve('node_modules/.geo/GeoLite2-Country.mmdb'));
}
const result = lookup.get(ip);
diff --git a/scripts/build-geo.js b/scripts/build-geo.js
index df7650df2..f4c5f62de 100644
--- a/scripts/build-geo.js
+++ b/scripts/build-geo.js
@@ -8,7 +8,7 @@ const zlib = require('zlib');
const tar = require('tar');
let url =
- 'https://raw.githubusercontent.com/GitSquared/node-geolite2-redist/master/redist/GeoLite2-City.tar.gz';
+ 'https://raw.githubusercontent.com/GitSquared/node-geolite2-redist/master/redist/GeoLite2-Country.tar.gz';
if (process.env.MAXMIND_LICENSE_KEY) {
url =
diff --git a/vercel.json b/vercel.json
deleted file mode 100644
index ba926a468..000000000
--- a/vercel.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "functions": {
- "pages/api/**/*": {
- "includeFiles": "node_modules/.geo/**"
- }
- }
-}