Skip to content

Commit

Permalink
Fix issue with country db.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecao committed Jul 16, 2021
1 parent 25085cb commit 526ed01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 526ed01

Please sign in to comment.