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

add rate limit #308

Merged
merged 3 commits into from
Nov 1, 2023
Merged

add rate limit #308

merged 3 commits into from
Nov 1, 2023

Conversation

peterdudfield
Copy link
Collaborator

@peterdudfield peterdudfield commented Oct 30, 2023

Pull Request

Description

Add a rate limit of 3600 per hour, or 1 a second on each route, for each IP address.
Ive used slowapi, could have use fastapi-limiter but it needed a redis query

#136

How Has This Been Tested?

  • CI tests
  • run locally and check limit kicks in
  • Yes

Checklist:

  • My code follows OCF's coding style guidelines
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked my code and corrected any misspellings

@peterdudfield peterdudfield self-assigned this Oct 30, 2023
@peterdudfield peterdudfield marked this pull request as ready for review October 30, 2023 20:39
@peterdudfield peterdudfield requested a review from devsjc October 31, 2023 08:07
@peterdudfield peterdudfield merged commit 6a86bfe into main Nov 1, 2023
1 check passed
@peterdudfield peterdudfield deleted the issue/rate-limit branch November 1, 2023 20:09
@peterdudfield
Copy link
Collaborator Author

Gona push this through, but @devsjc im happy if you have any comments

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.

1 participant