diff --git a/src/pages/api/send.ts b/src/pages/api/send.ts index 7734bff7..5aa367f0 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({