Real-Dev-Squad / tiny-site-backend

MIT License
3 stars 5 forks source link

URL Shortener Rate Limiting #90

Closed vinit717 closed 4 months ago

vinit717 commented 5 months ago

Issue Description

To ensure efficient, secure, and high-performing usage of our URL shortener API, we need to implement rate limits. This will help prevent abuse and ensure fair usage across all users. Specifically, we need to enforce a limit of 10 URL shortens per hour and a total of 50 URL shortens per user for the free plan. Additionally, users should not be able to repeatedly log in to bypass these limits.

Expected Behavior

Current Behavior

Screenshots

[If applicable, add screenshots or images that help illustrate the issue.]

Reproducibility

Steps to Reproduce

  1. Log in to the URL shortener.
  2. Shorten more than 10 URLs within an hour.
  3. Observe that there are no per-hour restrictions in place.
  4. Shorten more than 50 URLs in total.
  5. Observe that there are no total restrictions in place.
  6. Log out and log back in.
  7. Observe that you can continue shortening URLs without any limit.

Severity/Priority

Additional Information

Checklist


Thank you for contributing to our project! We appreciate your help in improving it.

ankushdharkar commented 5 months ago

Looks good for now. Please make sure we have an easy way to configure it