Skip to content

Commit

Permalink
add rate limit redis prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryHengZJ committed Jan 10, 2025
1 parent f94e055 commit 6058d08
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/server/src/utils/rateLimit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export class RateLimiterManager {
standardHeaders: true,
legacyHeaders: false,
store: new RedisStore({
prefix: `rl:${id}`,
// @ts-expect-error - Known issue: the `call` function is not present in @types/ioredis
sendCommand: (...args: string[]) => this.redisClient.call(...args)
}),
Expand Down

0 comments on commit 6058d08

Please sign in to comment.