pull/1468/head
CircleCI 2022-08-27 23:06:11 +02:00
parent 0f976be5d8
commit ecfe5d22c5
2 changed files with 2 additions and 3 deletions

View File

@ -1,4 +1,3 @@
import path from 'path';
import requestIp from 'request-ip';
import { browserName, detectOS } from 'detect-browser';
import isLocalhost from 'is-localhost-ip';
@ -68,7 +67,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('./node_modules/.geo/GeoLite2-Country.mmdb');
}
const result = lookup.get(ip);

View File

@ -1,2 +1,2 @@
[functions]
included_files = ["public/geo/*.mmdb"]
included_files = ["node_modules/.geo/*.mmdb"]