feature(api): override user-agent information
This commit is contained in:
@@ -19,7 +19,7 @@ export async function updateProfile(
|
||||
const projectId = request.projectId;
|
||||
const ip = getClientIp(request)!;
|
||||
const ua = request.headers['user-agent']!;
|
||||
const uaInfo = parseUserAgent(ua);
|
||||
const uaInfo = parseUserAgent(ua, properties);
|
||||
const geo = await parseIp(ip);
|
||||
|
||||
await upsertProfile({
|
||||
|
||||
@@ -273,7 +273,7 @@ async function identify({
|
||||
geo: GeoLocation;
|
||||
ua?: string;
|
||||
}) {
|
||||
const uaInfo = parseUserAgent(ua);
|
||||
const uaInfo = parseUserAgent(ua, payload.properties);
|
||||
await upsertProfile({
|
||||
...payload,
|
||||
id: payload.profileId,
|
||||
|
||||
Reference in New Issue
Block a user