Skip to content
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

Merged
merged 1 commit into from
Aug 28, 2023
Merged

adding kv and vercel postgres #41

merged 1 commit into from
Aug 28, 2023

Conversation

sangdth
Copy link
Member

@sangdth sangdth commented Aug 27, 2023

No description provided.

@vercel
Copy link

vercel bot commented Aug 27, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nextjs-template ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 28, 2023 8:09am

const ratelimit = new Ratelimit({
redis: kv,
// rate limit to num requests per 60 seconds
limiter: Ratelimit.slidingWindow(10, '60s'),
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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!

Copy link
Member Author

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

minhphuc010194
minhphuc010194 previously approved these changes Aug 28, 2023
@sangdth sangdth changed the base branch from work-on-credential to master August 28, 2023 06:43
@sangdth sangdth dismissed minhphuc010194’s stale review August 28, 2023 06:43

The base branch was changed.

@sangdth sangdth merged commit 0d2ac92 into master Aug 28, 2023
2 checks passed
@sangdth sangdth deleted the implement-rate-limit branch September 28, 2023 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants