mirror of
https://github.com/kremalicious/umami.git
synced 2025-02-14 21:10:34 +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",
|
"import/no-anonymous-default-export": "off",
|
||||||
"@next/next/no-img-element": "off",
|
"@next/next/no-img-element": "off",
|
||||||
"@typescript-eslint/no-empty-function": "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": {
|
"globals": {
|
||||||
"React": "writable"
|
"React": "writable"
|
||||||
|
@ -68,7 +68,7 @@ export async function getCountry(req, ip) {
|
|||||||
|
|
||||||
// Database lookup
|
// Database lookup
|
||||||
if (!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);
|
const result = lookup.get(ip);
|
||||||
|
@ -7,7 +7,7 @@ const zlib = require('zlib');
|
|||||||
const tar = require('tar');
|
const tar = require('tar');
|
||||||
|
|
||||||
let url =
|
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) {
|
if (process.env.MAXMIND_LICENSE_KEY) {
|
||||||
url =
|
url =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user