fix: fix remove trailing slash regex

This commit is contained in:
Eritque arcus
2025-05-22 00:24:48 -05:00
committed by GitHub
parent 8d483d9283
commit 33110a44ec

View File

@@ -169,7 +169,7 @@ export async function POST(request: Request) {
const twclid = currentUrl.searchParams.get('twclid');
if (process.env.REMOVE_TRAILING_SLASH) {
urlPath = urlPath.replace(/(.+)\/$/, '$1');
urlPath = urlPath.replace(/\/(?=(#.*)?$)/, '');
}
if (referrer) {