Skip to content

Conversation

@apapazisis
Copy link

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior?

The expiresAt field is not updated while new requests are sent.

Issue Number: N/A

What is the new behavior?

The expiresAt is updated on each request. That way we always calculate a new expiration time.
As an example if I have limit:2 and ttl: minutes(1) a bot which sends multiple requests will be blocked and as long as it continues to send requests will be blocked(429 error). The rate limit should go to 2 requests per minute to release the block(429 error).

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Copy link
Member

@micalevisk micalevisk left a comment

Choose a reason for hiding this comment

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

you can convert this PR to draft instead.

or, this this is ready:

  • revert the changes made on package-lock.json (tip: use npm ci instead of npm i next time)
  • remove the console.log left in the code
  • revert the changes made on test/app/app.module.ts file. I guess?

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.

2 participants