add cookie. add city database

This commit is contained in:
Sergei Meza 2022-10-18 16:37:05 +09:00
parent 5a8464e4e0
commit 63531f8753
3 changed files with 9 additions and 4 deletions

View file

@ -80,9 +80,9 @@ export async function getCountry(req, ip) {
return result?.country?.iso_code;
}
export async function getClientInfo(req, { screen, ip }) {
export async function getClientInfo(req, { screen }) {
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);