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.

Fix issue with country db.

Mike Cao526ed01d0a02
diff --git a/lib/request.js b/lib/request.js
index e5527f7de..dda9ede22 100644
--- a/lib/request.js
+++ b/lib/request.js
@@ -64,7 +64,7 @@ export async function getCountry(req, ip) {
// Database lookup
if (!lookup) {
- lookup = await maxmind.open(path.resolve('./public/geo/GeoLite2-Country.mmdb'));
+ lookup = await maxmind.open(path.resolve(__dirname, '../public/geo/GeoLite2-Country.mmdb'));
}
const result = lookup.get(ip);