mirror of
https://github.com/umami-software/umami.git
synced 2026-02-19 12:05:41 +01:00
change get ip method
This commit is contained in:
parent
1ca468cce1
commit
3c906d066b
2 changed files with 21 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue