diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/register.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/register.js b/lib/register.js index 90df18e2..e8b826e3 100644 --- a/lib/register.js +++ b/lib/register.js @@ -24,10 +24,10 @@ export default async (user, ip, requireChallenge) => { user.password = await bcrypt.hash(password, 1); } - if (!config.ipxapi || ip.startsWith("127") || ip.startsWith("192")) { - user.currency = "USD"; - } else { + user.currency = "USD"; + if (config.ipxapi) { let countryCode = "US"; + try { let r = await got(`https://ipxapi.com/api/ip?ip=${ip}`, { headers: { authorization: `Bearer ${config.ipxapi}` } |
