From ecfe5d22c51e0393356962ba84574446c72581ed Mon Sep 17 00:00:00 2001 From: CircleCI Date: Sat, 27 Aug 2022 23:06:11 +0200 Subject: [PATCH] try fix --- lib/request.js | 3 +-- netlify.toml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/request.js b/lib/request.js index 210921b9..cb9abc7b 100644 --- a/lib/request.js +++ b/lib/request.js @@ -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); diff --git a/netlify.toml b/netlify.toml index c7168738..51e90db9 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,2 +1,2 @@ [functions] -included_files = ["public/geo/*.mmdb"] +included_files = ["node_modules/.geo/*.mmdb"]