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

Feat/backend/rate limit api #46

Merged
merged 6 commits into from
Jun 6, 2024
Merged

Conversation

waveyboym
Copy link
Member

Description

As stated in the title, the pr aims to introduce a rate limiter to the backend to prevent overloading the backend with DDOS attacks or whenever ui engineers are making styling changes and hot reload components

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • A new function named TestRateLimit has been written which sends 10 requests in one second to the api. Since the backend has it's middleware to limit to only a max of 5 api requests per second, only 5 should be allowed through whilst the other 5 are blocked.
  • Ensuring that other ip addresses are not blocked from sending requests when one ip addresses is rate limited

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • 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
  • Any dependent changes have been merged and published in downstream modules

@waveyboym waveyboym added type: feature A new feature type: security This is a security related issue/pr type: testing This affects one or more tests For: api This is mainly for the api For: backend This is mainly for the backend code priority: medium This does/did not need to be addressed soon but should have plans in place to be addressed status: pending This is awaiting approval effort: 2 This can be/was resolved in minutes but requires/required shallow engagement labels Jun 6, 2024
@waveyboym waveyboym self-assigned this Jun 6, 2024
@waveyboym waveyboym linked an issue Jun 6, 2024 that may be closed by this pull request
1 task
Copy link

codecov bot commented Jun 6, 2024

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@waveyboym waveyboym merged commit 01cff59 into develop Jun 6, 2024
6 checks passed
@waveyboym waveyboym deleted the feat/backend/rate-limit-api branch June 6, 2024 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort: 2 This can be/was resolved in minutes but requires/required shallow engagement For: api This is mainly for the api For: backend This is mainly for the backend code priority: medium This does/did not need to be addressed soon but should have plans in place to be addressed status: pending This is awaiting approval type: feature A new feature type: security This is a security related issue/pr type: testing This affects one or more tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[TASK] Rate limit api
1 participant