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

api: limit rate of http requests #1420

Merged
merged 1 commit into from
Jul 27, 2023
Merged

Conversation

SamuelPull
Copy link
Collaborator

@SamuelPull SamuelPull commented Jul 18, 2023

Checklist

  • I have followed (at least) the PR section of the contributing guide.
  • I fixed all necessary PR warnings
  • The commit history is clean
  • The E2E tests are passing
  • If possible, the issue has been divided into more subtasks
  • I did a self review before requesting a review from another team member

Description

Rate limiting is optional and turned off by default. To test, set environment variable RATE_LMIT to the maximum number of requests per minute and use a browser or http client to trigger the limiter.

E2E tests and provisioning don't work with RATE_LIMIT set too low.

Closes #1418

@openkfwCI
Copy link

openkfwCI commented Jul 18, 2023

NotesTime
Note for Reviewer: E2E tests on remote server succeededThu, 27 Jul 2023 09:40:11 +0000

Generated by E2E-Test

@SamuelPull SamuelPull force-pushed the 1418-fastify-rate-limit branch 2 times, most recently from 75a20bd to e2a1bac Compare July 24, 2023 10:06
@andrea-smiesna
Copy link
Collaborator

I would add the RATE_LIMIT variable also to files (.env_example, docker-compose.yml) in docker-compose folder.

@SamuelPull SamuelPull force-pushed the 1418-fastify-rate-limit branch 2 times, most recently from a32ca04 to 036c75a Compare July 26, 2023 11:39
CHANGELOG.md Outdated
@@ -7,7 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

<!-- ## Unreleased -->

<!-- ### Added -->
### Added
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you please move this section under "Unreleased" and link the issue?

@andrea-smiesna andrea-smiesna merged commit 5102e4c into main Jul 27, 2023
28 checks passed
@andrea-smiesna andrea-smiesna deleted the 1418-fastify-rate-limit branch July 27, 2023 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants