mirror of
https://github.com/umami-software/umami.git
synced 2026-02-19 03:55:37 +01:00
fix: handle null referrer in pixel tracking route
request.headers.get("referer") returns null when the header is absent
(e.g. email clients). The Zod schema uses .optional() which accepts
undefined but rejects null, causing silent validation failure and
pixel events not being recorded.
Fixes #4028
This commit is contained in:
parent
a3733b0424
commit
bfe381e2b7
1 changed files with 1 additions and 1 deletions
|
|
@ -47,7 +47,7 @@ export async function GET(request: Request, { params }: { params: Promise<{ slug
|
||||||
payload: {
|
payload: {
|
||||||
pixel: pixel.id,
|
pixel: pixel.id,
|
||||||
url: request.url,
|
url: request.url,
|
||||||
referrer: request.headers.get('referer'),
|
referrer: request.headers.get("referer") || undefined,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue