mirror of
https://github.com/kremalicious/umami.git
synced 2024-12-24 18:26:20 +01:00
update to GeoLite2-City
This commit is contained in:
parent
eea01b21cf
commit
4351ef37f8
@ -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"
|
||||
|
@ -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);
|
||||
|
@ -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 =
|
||||
|
Loading…
Reference in New Issue
Block a user