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

[#155244960] add rate limiter #585

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open

[#155244960] add rate limiter #585

wants to merge 13 commits into from

Conversation

gunzip
Copy link
Contributor

@gunzip gunzip commented Mar 2, 2020

Add a rate limit to post / put endpoints. Defaults to 10000 calls per 1 hour for IP address.

Note that it does not rate limit for GET endpoints.

@digitalcitizenship
Copy link

digitalcitizenship commented Mar 2, 2020

Affected stories

New dependencies added: rate-limiter-flexible.

rate-limiter-flexible

Author: animir

Description: Node.js rate limiter by key and protection from DDoS and Brute-Force attacks in process Memory, Redis, MongoDb, Memcached, MySQL, PostgreSQL, Cluster or PM

Homepage: https://github.com/animir/node-rate-limiter-flexible#readme

Createdalmost 2 years ago
Last Updated24 days ago
LicenseISC
Maintainers1
Releases116
Keywordsauthorization, security, rate, limit, ratelimter, brute, force, bruteforce, throttle, koa, express, hapi, auth, ddos and queue
This README is too long to show.

Generated by 🚫 dangerJS

@codecov-io
Copy link

codecov-io commented Mar 2, 2020

Codecov Report

Merging #585 into master will increase coverage by 0.27%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #585      +/-   ##
==========================================
+ Coverage   82.92%   83.20%   +0.27%     
==========================================
  Files          48       49       +1     
  Lines        1394     1417      +23     
  Branches      245      246       +1     
==========================================
+ Hits         1156     1179      +23     
  Misses        226      226              
  Partials       12       12              
Impacted Files Coverage Δ
src/utils/middleware/rateLimiter.ts 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 994364e...7906d67. Read the comment docs.

src/utils/middleware/rateLimiter.ts Outdated Show resolved Hide resolved
src/utils/middleware/rateLimiter.ts Outdated Show resolved Hide resolved
src/utils/middleware/rateLimiter.ts Outdated Show resolved Hide resolved
gunzip and others added 3 commits March 3, 2020 11:15
Co-Authored-By: Daniele Manni <BurnedMarshal@users.noreply.github.com>
@gunzip
Copy link
Contributor Author

gunzip commented Mar 3, 2020

@cloudify can you check this PR and default vaules pls ?

Copy link
Contributor

@BurnedMarshal BurnedMarshal left a comment

Choose a reason for hiding this comment

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

lgtm

src/utils/middleware/rateLimiter.ts Show resolved Hide resolved
@gunzip gunzip added the on-hold label Mar 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants