diff --git a/apps/web/middleware.ts b/apps/web/middleware.ts index ef44d9e8d3..cb8f50f19b 100644 --- a/apps/web/middleware.ts +++ b/apps/web/middleware.ts @@ -101,7 +101,7 @@ const middleware = async (req: NextRequest): Promise> => { try { await checkRateLimitAndThrowError({ rateLimitingType: "common", - identifier: `${req.nextUrl.pathname}-${piiHasher.hash(requestorIp)}`, + identifier: `${encodeURIComponent(req.nextUrl.pathname)}-${piiHasher.hash(requestorIp)}`, }); } catch (error) { if (error instanceof HttpError) {