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

Rate limit implementation #303

Merged
merged 10 commits into from
Oct 6, 2024
Merged

Conversation

pedro-cf
Copy link
Collaborator

@pedro-cf pedro-cf commented Sep 26, 2024

Description:
Implementation of address based global rate limiting option.

Rate limiting is an optional security feature that controls API request frequency on a remote address basis. It's enabled by setting the STAC_FASTAPI_RATE_LIMIT environment variable, e.g., 500/minute. This limits each client to 500 requests per minute, helping prevent abuse and maintain API stability. Implementation examples are available in the examples/rate_limit directory.

PR Checklist:

  • Code is formatted and linted (run pre-commit run --all-files)
  • Tests pass (run make test)
  • Documentation has been updated to reflect changes, if applicable
  • Changes are added to the changelog

@pedro-cf
Copy link
Collaborator Author

I think it's ok for now, If anyone has any corrections/suggestions please feel free to add :)

Copy link
Collaborator

@jamesfisher-geo jamesfisher-geo left a comment

Choose a reason for hiding this comment

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

This looks great to me. I'll leave it for a day to give others a chance to review @jonhealy1 @StijnCaerts

Copy link
Collaborator

@jonhealy1 jonhealy1 left a comment

Choose a reason for hiding this comment

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

Nice work @pedro-cf. Really cool.

@jonhealy1 jonhealy1 merged commit bbbba05 into stac-utils:main Oct 6, 2024
15 checks passed
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.

3 participants