mirror of
https://github.com/umami-software/umami.git
synced 2026-02-19 12:05:41 +01:00
fix ip getter
This commit is contained in:
parent
d0f5c6dec7
commit
0336f41e12
2 changed files with 25 additions and 58 deletions
|
|
@ -45,7 +45,8 @@ export async function getSession(req) {
|
|||
throw new Error(`Website not found: ${website_uuid}`);
|
||||
}
|
||||
|
||||
const { userAgent, browser, os, ip, country, device } = await getClientInfo(req, payload);
|
||||
const ip = req.headers['x-forwarded-for'] || req.connection.remoteAddress;
|
||||
const { userAgent, browser, os, country, device } = await getClientInfo(req, payload);
|
||||
|
||||
let session_uuid = uuid(websiteId, hostname, ip, userAgent);
|
||||
if (process.env.CROSSDOMAIN_TRACKING) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue