diff --git a/server/middlewares/rateLimiter.ts b/server/middlewares/rateLimiter.ts index 3d418bb213db..fce14b1125cb 100644 --- a/server/middlewares/rateLimiter.ts +++ b/server/middlewares/rateLimiter.ts @@ -73,9 +73,11 @@ export function rateLimiter(config: RateLimiterConfig) { return next(); } - if (!RateLimiter.hasRateLimiter(ctx.path)) { + const fullPath = `${ctx.mountPath ?? ""}${ctx.path}`; + + if (!RateLimiter.hasRateLimiter(fullPath)) { RateLimiter.setRateLimiter( - ctx.path, + fullPath, defaults( { ...config,