change get ip method

This commit is contained in:
Sergei Meza 2022-10-14 18:54:29 +09:00
parent 1ca468cce1
commit 3c906d066b
2 changed files with 21 additions and 2 deletions

View file

@ -76,9 +76,9 @@ export async function getCountry(req, ip) {
return result?.country?.iso_code;
}
export async function getClientInfo(req, { screen }) {
export async function getClientInfo(req, { screen, ip }) {
const userAgent = req.headers['user-agent'];
const ip = getIpAddress(req);
// const ip = getIpAddress(req);
const country = await getCountry(req, ip);
const browser = browserName(userAgent);
const os = detectOS(userAgent);