-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't use rate-limit-redis #10
Comments
Hey, can you please provide me a reproduction of this, like on CodeSandbox or Stackblitz? |
Hey it will take sometime so I will give you instead the file url, i'm also using bun.sh here |
I tried creating a sample app, using pnpm. It did work out of the box (the rate-limiting stuff), but there is a type error. The error message is Type 'ConfigType<any, any, {}>' is missing the following properties from type 'Options': legacyHeaders, validate
const limiter = rateLimiter({
windowMs: 60 * 1000, // 1 minute
limit: 5,
standardHeaders: "draft-6", // draft-6: `RateLimit-*` headers;
keyGenerator: (c) => {
return "<unique_key>";
},
store: new RedisStore({
sendCommand: (...args: string[]) => redisClient.sendCommand(args),
}) as unknown as Store // Adding the correct type
}); |
It's working for me thanks for the help |
I'm trying to use
rate-limit-redis
but it's not working and compiling because of theredisStore
.Has the readme said I could use this store but I can't because of this error:
Here my setup
The text was updated successfully, but these errors were encountered: