From 51659870768c3f95299d4e270a661d6be5946027 Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Mon, 11 Mar 2024 20:56:36 -0700 Subject: [PATCH] Fixed remove trailing slash logic. --- src/pages/api/send.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/api/send.ts b/src/pages/api/send.ts index 7734bff73..5aa367f04 100644 --- a/src/pages/api/send.ts +++ b/src/pages/api/send.ts @@ -111,7 +111,7 @@ export default async (req: NextApiRequestCollect, res: NextApiResponse) => { } if (process.env.REMOVE_TRAILING_SLASH) { - urlPath = urlPath.replace(/.+\/$/, ''); + urlPath = urlPath.replace(/(.+)\/$/, '$1'); } await saveEvent({