Merge branch 'dev' of https://github.com/umami-software/umami into feat/add-segments

This commit is contained in:
Francis Cao 2025-06-11 06:46:31 -07:00
commit 1ccc8a1a86
16 changed files with 360 additions and 272 deletions

View file

@ -124,7 +124,9 @@ export async function getLocation(ip: string = '', headers: Headers, hasPayloadI
if (!global[MAXMIND]) {
const dir = path.join(process.cwd(), 'geo');
global[MAXMIND] = await maxmind.open(path.resolve(dir, 'GeoLite2-City.mmdb'));
global[MAXMIND] = await maxmind.open(
process.env.GEOLITE_DB_PATH || path.resolve(dir, 'GeoLite2-City.mmdb'),
);
}
const result = global[MAXMIND].get(ip);