fix: default to unknown user-agent
This commit is contained in:
@@ -125,7 +125,8 @@ async function buildContext(
|
|||||||
validatedBody.type === 'track' && validatedBody.payload.properties?.__ip
|
validatedBody.type === 'track' && validatedBody.payload.properties?.__ip
|
||||||
? (validatedBody.payload.properties.__ip as string)
|
? (validatedBody.payload.properties.__ip as string)
|
||||||
: request.clientIp;
|
: request.clientIp;
|
||||||
const ua = request.headers['user-agent'];
|
const ua = request.headers['user-agent'] ?? 'unknown/1.0';
|
||||||
|
|
||||||
const headers = getStringHeaders(request.headers);
|
const headers = getStringHeaders(request.headers);
|
||||||
|
|
||||||
const identity = getIdentity(validatedBody);
|
const identity = getIdentity(validatedBody);
|
||||||
|
|||||||
Reference in New Issue
Block a user