mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +01:00
Merge pull request #3445 from Nambers/master
fix: URL hash is not included in record
This commit is contained in:
commit
6c6555d00b
1 changed files with 2 additions and 2 deletions
|
|
@ -145,7 +145,7 @@ export async function POST(request: Request) {
|
||||||
const base = hostname ? `https://${hostname}` : 'https://localhost';
|
const base = hostname ? `https://${hostname}` : 'https://localhost';
|
||||||
const currentUrl = new URL(url, base);
|
const currentUrl = new URL(url, base);
|
||||||
|
|
||||||
let urlPath = currentUrl.pathname === '/undefined' ? '' : currentUrl.pathname;
|
let urlPath = currentUrl.pathname === '/undefined' ? '' : currentUrl.pathname + currentUrl.hash;
|
||||||
const urlQuery = currentUrl.search.substring(1);
|
const urlQuery = currentUrl.search.substring(1);
|
||||||
const urlDomain = currentUrl.hostname.replace(/^www./, '');
|
const urlDomain = currentUrl.hostname.replace(/^www./, '');
|
||||||
|
|
||||||
|
|
@ -169,7 +169,7 @@ export async function POST(request: Request) {
|
||||||
const twclid = currentUrl.searchParams.get('twclid');
|
const twclid = currentUrl.searchParams.get('twclid');
|
||||||
|
|
||||||
if (process.env.REMOVE_TRAILING_SLASH) {
|
if (process.env.REMOVE_TRAILING_SLASH) {
|
||||||
urlPath = urlPath.replace(/(.+)\/$/, '$1');
|
urlPath = urlPath.replace(/\/(?=(#.*)?$)/, '');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (referrer) {
|
if (referrer) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue