Consider hash as part of the path

This commit is contained in:
Andreas Hocevar 2025-02-20 11:01:48 +01:00
parent 7bb89b28be
commit 534bbb5b62
No known key found for this signature in database
GPG key ID: F7FA44133EB59BCD

View file

@ -133,7 +133,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; let urlPath = 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./, '');