mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 07:37:11 +01:00
Try another path.
This commit is contained in:
parent
353a49f37a
commit
0935765ac7
2 changed files with 6 additions and 6 deletions
|
|
@ -3,8 +3,6 @@ import requestIp from 'request-ip';
|
|||
import { browserName, detectOS } from 'detect-browser';
|
||||
import isLocalhost from 'is-localhost-ip';
|
||||
import maxmind from 'maxmind';
|
||||
import getConfig from 'next/config';
|
||||
const { serverRuntimeConfig } = getConfig();
|
||||
|
||||
import {
|
||||
DESKTOP_OS,
|
||||
|
|
@ -63,9 +61,7 @@ export async function getCountry(req, ip) {
|
|||
}
|
||||
|
||||
// Database lookup
|
||||
const lookup = await maxmind.open(
|
||||
path.resolve(serverRuntimeConfig.PROJECT_ROOT, 'public/geo/GeoLite2-Country.mmdb'),
|
||||
);
|
||||
const lookup = await maxmind.open(path.resolve('./public/geo/GeoLite2-Country.mmdb'));
|
||||
|
||||
const result = lookup.get(ip);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue