From 526ed01d0a026ec7f056be83dac4aa36c19e8a48 Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Fri, 16 Jul 2021 09:23:55 -0700 Subject: [PATCH] Fix issue with country db. --- lib/request.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/request.js b/lib/request.js index e5527f7d..dda9ede2 100644 --- a/lib/request.js +++ b/lib/request.js @@ -64,7 +64,7 @@ export async function getCountry(req, ip) { // Database lookup if (!lookup) { - lookup = await maxmind.open(path.resolve('./public/geo/GeoLite2-Country.mmdb')); + lookup = await maxmind.open(path.resolve(__dirname, '../public/geo/GeoLite2-Country.mmdb')); } const result = lookup.get(ip);