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

Implement rate limiting #648

Merged
merged 2 commits into from
Nov 12, 2023
Merged

Implement rate limiting #648

merged 2 commits into from
Nov 12, 2023

Conversation

daisykucharski
Copy link
Contributor

@daisykucharski daisykucharski commented Nov 5, 2023

Description

Implement rate limiting on all endpoints. Limits to 100 max per minute on all endpoints except the login endpoint which is limited to 20 max per minute. This is on a per-IP basis (i.e. every person accessing the app gets the 100 max requests per minute)

Closes #569

Type of change

Please tick the boxes that best match your changes.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • This requires a run of yarn install
  • This has migration changes and requires a run of yarn dev:migration:run

How Has This Been Tested?

Tested exceeding limit and it was successfully throttled

Checklist:

  • I have run the production builds in docker for the frontend/backend and ensure things run fine. Check README of repo on how to run if not sure.
  • I have performed a self-review of my own code
  • I have commented my code where needed
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I've run the end to end tests
  • Any dependent changes have been merged and published in downstream modules

Copy link

vercel bot commented Nov 5, 2023

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

Name Status Preview Comments Updated (UTC)
graduatenu-frontend-v2 ❌ Failed (Inspect) Nov 10, 2023 0:18am

Copy link
Contributor

@BrandonLim8890 BrandonLim8890 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Only testing for login but code all looks good!

@daisykucharski daisykucharski merged commit afb1615 into main Nov 12, 2023
5 checks passed
@daisykucharski daisykucharski deleted the daisyk/rate-limiting branch November 12, 2023 19:08
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.

Basic rate limiting
2 participants