mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 14:47:14 +01:00
Merge branch 'dev' into jajaja
# Conflicts: # src/lib/detect.ts # src/queries/sql/reports/getRevenue.ts
This commit is contained in:
commit
0027502707
8 changed files with 70 additions and 69 deletions
|
|
@ -124,7 +124,9 @@ export async function getLocation(ip: string = '', headers: Headers, hasPayloadI
|
|||
if (!globalThis[MAXMIND]) {
|
||||
const dir = path.join(process.cwd(), 'geo');
|
||||
|
||||
globalThis[MAXMIND] = await maxmind.open(path.resolve(dir, 'GeoLite2-City.mmdb'));
|
||||
globalThis[MAXMIND] = await maxmind.open(
|
||||
process.env.GEOLITE_DB_PATH || path.resolve(dir, 'GeoLite2-City.mmdb'),
|
||||
);
|
||||
}
|
||||
|
||||
const result = globalThis[MAXMIND].get(ip);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue