mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 23:57:12 +01:00
Removed session code.
This commit is contained in:
parent
343e59e6ff
commit
5cade59111
6 changed files with 47 additions and 53 deletions
|
|
@ -68,13 +68,13 @@ export async function getCountry(req, ip) {
|
|||
|
||||
lookup.close();
|
||||
|
||||
return result.country.iso_code;
|
||||
return result?.country?.iso_code;
|
||||
}
|
||||
|
||||
export async function getClientInfo(req, { screen }) {
|
||||
const userAgent = req.headers['user-agent'];
|
||||
const ip = getIpAddress(req);
|
||||
const country = await getCountry(req, ip);
|
||||
const userAgent = req.headers['user-agent'];
|
||||
const browser = browserName(userAgent);
|
||||
const os = detectOS(userAgent);
|
||||
const device = getDevice(screen, browser, os);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue