-
Notifications
You must be signed in to change notification settings - Fork 0
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
adding kv and vercel postgres #41
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
const ratelimit = new Ratelimit({ | ||
redis: kv, | ||
// rate limit to num requests per 60 seconds | ||
limiter: Ratelimit.slidingWindow(10, '60s'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RateLimit mình dùng để giới hạn request từ user lại hả anh Sang?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ừ, vì mình không có cách nào để chặn public khi họ register tài khoản mới, nên để tránh bị phá (nó rảnh nó ngồi tạo 1000 tài khoản / ngày) nên cái này là để giới hạn requests. Anh vẫn chưa tìm ra cách để giới hạn từng cái POST/GET riêng lẻ. Để hôm nay làm tiếp.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mình có nên gắn thêm google captcha ko anh!? em thấy cái đó nó block đc bot
thì phải!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
khi nào cần hẵng làm, release bản basic trước đã, đừng over-engineer :D
763c18f
to
d1c41be
Compare
No description provided.