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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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) {