Fix referrer lookup.
parent
ba71f5cafc
commit
ae772f048c
|
@ -117,7 +117,7 @@ export default async (req: NextApiRequestCollect, res: NextApiResponse) => {
|
||||||
urlPath = '/';
|
urlPath = '/';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (referrerPath.startsWith('http')) {
|
if (referrerPath?.startsWith('http')) {
|
||||||
const refUrl = new URL(referrer);
|
const refUrl = new URL(referrer);
|
||||||
referrerPath = refUrl.pathname;
|
referrerPath = refUrl.pathname;
|
||||||
referrerQuery = refUrl.search.substring(1);
|
referrerQuery = refUrl.search.substring(1);
|
||||||
|
|
Loading…
Reference in New Issue