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.

update to GeoLite2-City

Francis Cao4351ef37f87f
diff --git a/.eslintrc.json b/.eslintrc.json
index de639b855..bcc38cf8d 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -48,7 +48,8 @@
"import/no-anonymous-default-export": "off",
"@next/next/no-img-element": "off",
"@typescript-eslint/no-empty-function": "off",
- "@typescript-eslint/no-explicit-any": "off"
+ "@typescript-eslint/no-explicit-any": "off",
+ "@typescript-eslint/no-var-requires": "off"
},
"globals": {
"React": "writable"
diff --git a/lib/detect.js b/lib/detect.js
index 210921b98..44eaa26af 100644
--- a/lib/detect.js
+++ b/lib/detect.js
@@ -68,7 +68,7 @@ export async function getCountry(req, ip) {
// Database lookup
if (!lookup) {
- lookup = await maxmind.open(path.resolve('node_modules/.geo/GeoLite2-Country.mmdb'));
+ lookup = await maxmind.open(path.resolve('node_modules/.geo/GeoLite2-City.mmdb'));
}
const result = lookup.get(ip);
diff --git a/scripts/build-geo.js b/scripts/build-geo.js
index 2ee601db5..e84c15644 100644
--- a/scripts/build-geo.js
+++ b/scripts/build-geo.js
@@ -7,7 +7,7 @@ const zlib = require('zlib');
const tar = require('tar');
let url =
- 'https://raw.githubusercontent.com/GitSquared/node-geolite2-redist/master/redist/GeoLite2-Country.tar.gz';
+ 'https://raw.githubusercontent.com/GitSquared/node-geolite2-redist/master/redist/GeoLite2-City.tar.gz';
if (process.env.MAXMIND_LICENSE_KEY) {
url =